Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-18621] Proposed formatting changes #297

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugins/com.aptana.core/src/com/aptana/core/CorePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void stop(BundleContext context) throws Exception

/**
* Returns the shared instance
*
*
* @return the shared instance
*/
public static CorePlugin getDefault()
Expand All @@ -158,7 +158,7 @@ public static CorePlugin getDefault()

/**
* Returns the {@link ISourceMapRegistry}.
*
*
* @return {@link ISourceMapRegistry}.
*/
public synchronized ISourceMapRegistry getSourceMapRegistry()
Expand All @@ -172,7 +172,7 @@ public synchronized ISourceMapRegistry getSourceMapRegistry()

/**
* Returns the {@link IDiagnosticManager}.
*
*
* @return {@link IDiagnosticManager}.
*/
public synchronized IDiagnosticManager getDiagnosticManager()
Expand All @@ -196,7 +196,7 @@ public static String getAptanaStudioVersion()

/**
* Returns the current bundle context
*
*
* @return
*/
public BundleContext getContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface CoreStrings
public static final String REFRESH = Messages.CoreStrings_Refresh;

public static final String PROPERTIES = Messages.CoreStrings_Properties;

public static final String CONTINUE = Messages.CoreStrings_Continue;

public static final String CANCEL = Messages.CoreStrings_Cancel;
Expand Down
4 changes: 2 additions & 2 deletions plugins/com.aptana.core/src/com/aptana/core/Identifiable.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

/**
* @author Max Stepanov
*
*/
public interface Identifiable {
public interface Identifiable
{

/**
* @return id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,25 @@

/**
* @author Max Stepanov
*
*/
public class PlatformPropertyTester extends PropertyTester {
public class PlatformPropertyTester extends PropertyTester
{

/* (non-Javadoc)
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
/*
* (non-Javadoc)
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[],
* java.lang.Object)
*/
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
public boolean test(Object receiver, String property, Object[] args, Object expectedValue)
{
if ("os".equals(property)) { //$NON-NLS-1$
return Platform.getOS().equals(String.valueOf(expectedValue));
} else if ("ws".equals(property)) { //$NON-NLS-1$
}
else if ("ws".equals(property)) { //$NON-NLS-1$
return Platform.getWS().equals(String.valueOf(expectedValue));
} else if ("arch".equals(property)) { //$NON-NLS-1$
return Platform.getOSArch().equals(String.valueOf(expectedValue));
}
else if ("arch".equals(property)) { //$NON-NLS-1$
return Platform.getOSArch().equals(String.valueOf(expectedValue));
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,32 @@

/**
* @author Max Stepanov
*
*/
public final class CoreNatives {
public final class CoreNatives
{

/**
* Major version number (must be >= 0)
*/
private static final int MAJOR_VERSION = 3;
private static final int MAJOR_VERSION = 3;

/**
* Minor version number (must be in the range 0..999)
*/
private static final int MINOR_VERSION = 0;
private static final int MINOR_VERSION = 0;

/**
* release number (must be >= 0)
*/
private static final int RELEASE = 0;


/* Win32 */

/**
* CSIDL_DESKTOPDIRECTORY
*/
public static final int CSIDL_DESKTOPDIRECTORY = 0x0010;

/**
* CSIDL_LOCAL_APPDATA
*/
Expand All @@ -52,7 +51,7 @@ public final class CoreNatives {
* FILE_ATTRIBUTE_HIDDEN
*/
public static final int FILE_ATTRIBUTE_HIDDEN = 0x00000002;

/**
* FILE_ATTRIBUTE_TEMPORARY
*/
Expand Down Expand Up @@ -86,79 +85,75 @@ public final class CoreNatives {
public static final long HKEY_CURRENT_USER = 0x80000001;
public static final long HKEY_LOCAL_MACHINE = 0x80000002;

public static final int KEY_QUERY_VALUE = 0x00000001;
public static final int KEY_SET_VALUE = 0x00000002;
public static final int KEY_CREATE_SUB_KEY = 0x00000004;
public static final int KEY_ENUMERATE_SUB_KEYS = 0x00000008;
public static final int KEY_READ = 0x00020019;
public static final int KEY_WRITE = 0x00020006;
public static final int KEY_ALL_ACCESS = 0x000F003F;

static {
System.loadLibrary("core"+getVersionString()); //$NON-NLS-1$
public static final int KEY_QUERY_VALUE = 0x00000001;
public static final int KEY_SET_VALUE = 0x00000002;
public static final int KEY_CREATE_SUB_KEY = 0x00000004;
public static final int KEY_ENUMERATE_SUB_KEYS = 0x00000008;
public static final int KEY_READ = 0x00020019;
public static final int KEY_WRITE = 0x00020006;
public static final int KEY_ALL_ACCESS = 0x000F003F;

static
{
System.loadLibrary("core" + getVersionString()); //$NON-NLS-1$
}

private CoreNatives() {

private CoreNatives()
{
}

// CHECKSTYLE:OFF
/**
*
* GetProcessList
*
*
* @return Object[]
*/
public static final native Object[] GetProcessList();

/**
*
* GetCurrentProcessId
*
*
* @return int
*/
public static final native int GetCurrentProcessId();

/**
*
* KillProcess
*
*
* @param pid
*/
public static final native void KillProcess(int pid);

/**
*
* GetSpecialFolderPath
*
*
* @param csidl
* @return String
*/
public static final native String GetSpecialFolderPath(int csidl);

/**
*
* SHObjectProperties
*
*
* @param handle
* @param type
* @param object
* @param page
* @return boolean
*/
public static final native boolean SHObjectProperties(int/*long*/ handle, int type, String object, String page);
public static final native boolean SHObjectProperties(int/* long */handle, int type, String object, String page);

/**
*
* ExpandEnvironmentStrings
*
*
* @param path
* @return String
*/
public static final native String ExpandEnvironmentStrings(String path);

/**
* SetFileAttributes
*
*
* @param path
* @param set
* @param clear
Expand All @@ -167,58 +162,50 @@ private CoreNatives() {
public static final native boolean SetFileAttributes(String path, int set, int clear);

/**
* RegOpenKey Open regestry key
*
* RegOpenKey
* Open regestry key
*
* @param hKeyParent
* @param keyName
* @param accessMask
* @param hKeyResult
* @return boolean
*/
public static final native boolean RegOpenKey(long hKeyParent, String keyName, int accessMask, /*out*/long[] hKeyResult);
public static final native boolean RegOpenKey(long hKeyParent, String keyName, int accessMask, /* out */
long[] hKeyResult);

/**
* RegCreateKey Create regestry key
*
* RegCreateKey
* Create regestry key
*
* @param hKeyParent
* @param keyName
* @param accessMask
* @param hKeyResult
* @return boolean
*/
public static final native boolean RegCreateKey(long hKeyParent, String keyName, int accessMask, /*out*/long[] hKeyResult);
public static final native boolean RegCreateKey(long hKeyParent, String keyName, int accessMask, /* out */
long[] hKeyResult);

/**
* RegCloseKey Close previously opened regestry key
*
* RegCloseKey
* Close previously opened regestry key
*
* @param hKey
* @return boolean
*/
public static final native boolean RegCloseKey(long hKey);

/**
* RegQueryValue Read value of regestry key
*
* RegQueryValue
* Read value of regestry key
*
* @param hKey
* @param valueName
* @param valueResult
* @return boolean
*/
public static final native boolean RegQueryValue(long hKey, String valueName, /*out*/String[] valueResult);
public static final native boolean RegQueryValue(long hKey, String valueName, /* out */String[] valueResult);

/**
* RegSetValue Set value of regestry key
*
* RegSetValue
* Set value of regestry key
*
* @param hKey
* @param valueName
* @param value
Expand All @@ -227,29 +214,28 @@ private CoreNatives() {
public static final native boolean RegSetValue(long hKey, String valueName, String value);

/**
* IsUserAnAdmin
* Tests whether the current user is a member of the Administrator's group.
* IsUserAnAdmin Tests whether the current user is a member of the Administrator's group.
*/
public static final native boolean IsUserAnAdmin();

/**
* ShellExecuteEx
*
* @param file
* @param params
* @param verb
* @param directory
* @param nShow
* @return
*/
public static final native boolean ShellExecuteEx(String file, String params, String verb, String directory, int nShow);
public static final native boolean ShellExecuteEx(String file, String params, String verb, String directory,
int nShow);

// CHECKSTYLE:ON


private static String getVersionString() {
return MessageFormat.format("_{0}_{1}_{2}", new Object[]{ //$NON-NLS-1$
Integer.toString(MAJOR_VERSION),
Integer.toString(MINOR_VERSION),
Integer.toString(RELEASE)
});

private static String getVersionString()
{
return MessageFormat.format("_{0}_{1}_{2}", new Object[] { //$NON-NLS-1$
Integer.toString(MAJOR_VERSION), Integer.toString(MINOR_VERSION), Integer.toString(RELEASE) });
}
}
Loading