[jbosstools-commits] JBoss Tools SVN: r6515 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Feb 21 21:27:06 EST 2008


Author: rob.stryker at jboss.com
Date: 2008-02-21 21:27:05 -0500 (Thu, 21 Feb 2008)
New Revision: 6515

Modified:
   trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java
Log:
JBIDE-1709

Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java	2008-02-22 02:17:38 UTC (rev 6514)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java	2008-02-22 02:27:05 UTC (rev 6515)
@@ -49,7 +49,7 @@
 		return main;
 	}
 	
-	public IPath getElementTwo() {
+	public IPath getResourceLocationIfExists() {
 		IAdaptable el = getElement();
 		return el == null ? null :  
 				((IResource)el.getAdapter(IResource.class)).getLocation();
@@ -59,10 +59,10 @@
 		return ArchivesCore.getInstance().getPreferenceManager();
 	}
 	protected void fillValues() {
-		if( getElementTwo() != null ) {
-			overrideButton.setSelection(getPrefManager().areProjectSpecificPrefsEnabled(getElementTwo()));
+		if( getResourceLocationIfExists() != null ) {
+			overrideButton.setSelection(getPrefManager().areProjectSpecificPrefsEnabled(getResourceLocationIfExists()));
 		}
-		automaticBuilder.setSelection(getPrefManager().isBuilderEnabled(getElementTwo()));		
+		automaticBuilder.setSelection(getPrefManager().isBuilderEnabled(getResourceLocationIfExists()));		
 		showAllProjects.setSelection(
 				PrefsInitializer.getBoolean(PrefsInitializer.PREF_SHOW_ALL_PROJECTS, getElement(), false));
 		showPackageOutputPath.setSelection(
@@ -82,7 +82,7 @@
 	}
 	
 	protected void createOverridePrefs(Composite main) {
-		if( getElementTwo() != null ) {
+		if( getResourceLocationIfExists() != null ) {
 			overrideComp = new Composite(main, SWT.NONE);
 			overrideComp.setLayout(new FillLayout());
 			overrideButton = new Button(overrideComp, SWT.CHECK);
@@ -165,7 +165,7 @@
 		showFullFilesetRootDir.setSelection(true);
 		showProjectRoot.setSelection(true);
 		showAllProjects.setSelection(false);
-		if( getElementTwo() != null ) {
+		if( getResourceLocationIfExists() != null ) {
 			overrideButton.setSelection(false);
 			setWidgetsEnabled(overrideButton.getSelection());
 		} else {
@@ -174,10 +174,10 @@
 	}
 
 	public boolean performOk() {
-		if( getElementTwo() != null ) {
-			getPrefManager().setProjectSpecificPrefsEnabled(getElementTwo(), overrideButton.getSelection());
+		if( getResourceLocationIfExists() != null ) {
+			getPrefManager().setProjectSpecificPrefsEnabled(getResourceLocationIfExists(), overrideButton.getSelection());
 		}
-		getPrefManager().setBuilderEnabled(getElementTwo(), automaticBuilder.getSelection());
+		getPrefManager().setBuilderEnabled(getResourceLocationIfExists(), automaticBuilder.getSelection());
 		PrefsInitializer.setBoolean(PrefsInitializer.PREF_SHOW_PACKAGE_OUTPUT_PATH, showPackageOutputPath.getSelection(), getElement());
 		PrefsInitializer.setBoolean(PrefsInitializer.PREF_SHOW_FULL_FILESET_ROOT_DIR, showFullFilesetRootDir.getSelection(), getElement());
 		PrefsInitializer.setBoolean(PrefsInitializer.PREF_SHOW_PROJECT_ROOT, showProjectRoot.getSelection(), getElement());




More information about the jbosstools-commits mailing list