@Override public Set keySet() { Set result = new HashSet(); for (String name : store.propertyNames()) { result.add(name); } return result; }
public static String startupInfo() { Bundle bundle = AspectJUIPlugin.getDefault().getBundle(); String version = (String) bundle.getHeaders().get( Constants.BUNDLE_VERSION); StringBuffer eventData = new StringBuffer( ); eventData.append( "Startup information: "); //$NON-NLS-1$ eventData.append( "\n AJDT version: " ); //$NON-NLS-1$ eventData.append( version ); eventData.append( " for Eclipse " ); //$NON-NLS-1$ eventData.append( EclipseVersion.MAJOR_VERSION + "." + EclipseVersion.MINOR_VERSION); //$NON-NLS-1$ eventData.append( "\n AspectJ Compiler version: " ); //$NON-NLS-1$ eventData.append( Version.text ); eventData.append( "\n usingVisualiser="+AspectJUIPlugin.usingVisualiser ); //$NON-NLS-1$ eventData.append( "\n usingXref="+AspectJUIPlugin.usingXref ); //$NON-NLS-1$ eventData.append( "\n usingCUprovider="+AspectJPlugin.usingCUprovider ); //$NON-NLS-1$ IPreferenceStore store = AspectJUIPlugin.getDefault().getPreferenceStore(); String[] props = AspectJUIPlugin.getDefault().getPluginPreferences().propertyNames(); for ( int i = 0; i < props.length; i++ ) { eventData.append( "\n " ); //$NON-NLS-1$ eventData.append( props[i] ); eventData.append( " = " ); //$NON-NLS-1$ eventData.append( store.getString( props[i] ) ); } return eventData.toString(); }
/** * @see org.eclipse.core.resources.IPathVariableManager#getPathVariableNames() */ @Override public String[] getPathVariableNames() { List<String> result = new LinkedList<>(); String[] names = preferences.propertyNames(); for (String name : names) { if (name.startsWith(VARIABLE_PREFIX)) { String key = name.substring(VARIABLE_PREFIX.length()); // filter out names for preferences which might be valid in the // preference store but does not have valid path variable names // and/or values. We can get in this state if the user has // edited the file on disk or set a preference using the prefix // reserved to path variables (#VARIABLE_PREFIX). // TODO: we may want to look at removing these keys from the // preference store as a garbage collection means if (validateName(key).isOK() && validateValue(getValue(key)).isOK()) result.add(key); } } return result.toArray(new String[result.size()]); }
/** * @see org.eclipse.core.resources.IPathVariableManager#getPathVariableNames() */ @Override public String[] getPathVariableNames() { List<String> result = new LinkedList<>(); String[] names = preferences.propertyNames(); for (int i = 0; i < names.length; i++) { if (names[i].startsWith(VARIABLE_PREFIX)) { String key = names[i].substring(VARIABLE_PREFIX.length()); // filter out names for preferences which might be valid in the // preference store but does not have valid path variable names // and/or values. We can get in this state if the user has // edited the file on disk or set a preference using the prefix // reserved to path variables (#VARIABLE_PREFIX). // TODO: we may want to look at removing these keys from the // preference store as a garbage collection means if (validateName(key).isOK() && validateValue(getValue(key)).isOK()) result.add(key); } } return result.toArray(new String[result.size()]); }
/** * @see org.eclipse.core.resources.IPathVariableManager#getPathVariableNames() */ @Override public String[] getPathVariableNames() { List<String> result = new LinkedList<>(); String[] names = preferences.propertyNames(); for (int i = 0; i < names.length; i++) { if (names[i].startsWith(VARIABLE_PREFIX)) { String key = names[i].substring(VARIABLE_PREFIX.length()); // filter out names for preferences which might be valid in the // preference store but does not have valid path variable names // and/or values. We can get in this state if the user has // edited the file on disk or set a preference using the prefix // reserved to path variables (#VARIABLE_PREFIX). // TODO: we may want to look at removing these keys from the // preference store as a garbage collection means if (validateName(key).isOK() && validateValue(getValue(key)).isOK()) result.add(key); } } return result.toArray(new String[result.size()]); }