? j2seproject85405.diff
Index: arch.xml
===================================================================
RCS file: /cvs/java/j2seproject/arch.xml,v
retrieving revision 1.14
diff -c -r1.14 arch.xml
*** arch.xml 18 Sep 2006 11:28:10 -0000 1.14
--- arch.xml 3 Oct 2006 08:46:04 -0000
***************
*** 1069,1076 ****
"Projects/org-netbeans-modules-java-j2seproject/Customizer" folder's content is used to construct the project's customizer.
It's content is expected to be ProjectCustomizer.CompositeCategoryProvider
instances.
! The lookup passed to the panels contains an instance of Project
and org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties
! Please note that the latter is not part of any public APIs and you need implementation dependency to make use of it.
--- 1069,1075 ----
"Projects/org-netbeans-modules-java-j2seproject/Customizer" folder's content is used to construct the project's customizer.
It's content is expected to be ProjectCustomizer.CompositeCategoryProvider
instances.
! The lookup passed to the panels contains an instance of Project
and org.netbeans.spi.project.support.ant.ui.AntProjectProperties
Index: src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java
===================================================================
RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java,v
retrieving revision 1.59
diff -c -r1.59 J2SEProjectProperties.java
*** src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java 8 Sep 2006 18:33:48 -0000 1.59
--- src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java 3 Oct 2006 08:46:04 -0000
***************
*** 53,58 ****
--- 53,59 ----
import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
import org.netbeans.spi.project.support.ant.PropertyEvaluator;
import org.netbeans.spi.project.support.ant.ReferenceHelper;
+ import org.netbeans.spi.project.support.ant.ui.AntProjectProperties;
import org.netbeans.spi.project.support.ant.ui.StoreGroup;
import org.openide.DialogDisplayer;
import org.openide.ErrorManager;
***************
*** 67,73 ****
/**
* @author Petr Hrebejk
*/
! public class J2SEProjectProperties {
//Hotfix of the issue #70058
//Should be removed when the StoreGroup SPI will be extended to allow false default value in ToggleButtonModel
--- 68,74 ----
/**
* @author Petr Hrebejk
*/
! public class J2SEProjectProperties extends AntProjectProperties {
//Hotfix of the issue #70058
//Should be removed when the StoreGroup SPI will be extended to allow false default value in ToggleButtonModel
***************
*** 205,214 ****
private ReferenceHelper refHelper;
private GeneratedFilesHelper genFileHelper;
- private StoreGroup privateGroup;
- private StoreGroup projectGroup;
-
- private Properties additionalProperties;
J2SEProject getProject() {
return project;
--- 206,211 ----
***************
*** 223,233 ****
this.genFileHelper = genFileHelper;
this.cs = new ClassPathSupport( evaluator, refHelper, updateHelper.getAntProjectHelper(), WELL_KNOWN_PATHS, LIBRARY_PREFIX, LIBRARY_SUFFIX, ANT_ARTIFACT_PREFIX );
- privateGroup = new StoreGroup();
- projectGroup = new StoreGroup();
-
- additionalProperties = new Properties();
-
init(); // Load known properties
}
--- 220,225 ----
***************
*** 254,260 ****
JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer ();
// CustomizerCompile
! JAVAC_DEPRECATION_MODEL = projectGroup.createToggleButtonModel( evaluator, JAVAC_DEPRECATION );
//Hotfix of the issue #70058
//Should use the StoreGroup when the StoreGroup SPI will be extended to allow false default value in ToggleButtonModel
--- 246,252 ----
JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer ();
// CustomizerCompile
! JAVAC_DEPRECATION_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAVAC_DEPRECATION );
//Hotfix of the issue #70058
//Should use the StoreGroup when the StoreGroup SPI will be extended to allow false default value in ToggleButtonModel
***************
*** 262,291 ****
JAVAC_DEBUG_MODEL = createToggleButtonModel( evaluator, JAVAC_DEBUG, kind);
javacDebugBooleanKind = kind[0];
! NO_DEPENDENCIES_MODEL = projectGroup.createInverseToggleButtonModel( evaluator, NO_DEPENDENCIES );
! JAVAC_COMPILER_ARG_MODEL = projectGroup.createStringDocument( evaluator, JAVAC_COMPILER_ARG );
// CustomizerJar
! DIST_JAR_MODEL = projectGroup.createStringDocument( evaluator, DIST_JAR );
! BUILD_CLASSES_EXCLUDES_MODEL = projectGroup.createStringDocument( evaluator, BUILD_CLASSES_EXCLUDES );
! JAR_COMPRESS_MODEL = projectGroup.createToggleButtonModel( evaluator, JAR_COMPRESS );
// CustomizerJavadoc
! JAVADOC_PRIVATE_MODEL = projectGroup.createToggleButtonModel( evaluator, JAVADOC_PRIVATE );
! JAVADOC_NO_TREE_MODEL = projectGroup.createInverseToggleButtonModel( evaluator, JAVADOC_NO_TREE );
! JAVADOC_USE_MODEL = projectGroup.createToggleButtonModel( evaluator, JAVADOC_USE );
! JAVADOC_NO_NAVBAR_MODEL = projectGroup.createInverseToggleButtonModel( evaluator, JAVADOC_NO_NAVBAR );
! JAVADOC_NO_INDEX_MODEL = projectGroup.createInverseToggleButtonModel( evaluator, JAVADOC_NO_INDEX );
! JAVADOC_SPLIT_INDEX_MODEL = projectGroup.createToggleButtonModel( evaluator, JAVADOC_SPLIT_INDEX );
! JAVADOC_AUTHOR_MODEL = projectGroup.createToggleButtonModel( evaluator, JAVADOC_AUTHOR );
! JAVADOC_VERSION_MODEL = projectGroup.createToggleButtonModel( evaluator, JAVADOC_VERSION );
! JAVADOC_WINDOW_TITLE_MODEL = projectGroup.createStringDocument( evaluator, JAVADOC_WINDOW_TITLE );
//Hotfix of the issue #70058
//Should use the StoreGroup when the StoreGroup SPI will be extended to allow false default value in ToggleButtonModel
JAVADOC_PREVIEW_MODEL = createToggleButtonModel ( evaluator, JAVADOC_PREVIEW, kind);
javadocPreviewBooleanKind = kind[0];
! JAVADOC_ADDITIONALPARAM_MODEL = projectGroup.createStringDocument( evaluator, JAVADOC_ADDITIONALPARAM );
// CustomizerRun
RUN_CONFIGS = readRunConfigs();
activeConfig = evaluator.getProperty("config");
--- 254,283 ----
JAVAC_DEBUG_MODEL = createToggleButtonModel( evaluator, JAVAC_DEBUG, kind);
javacDebugBooleanKind = kind[0];
! NO_DEPENDENCIES_MODEL = getPublicStoreGroup().createInverseToggleButtonModel( evaluator, NO_DEPENDENCIES );
! JAVAC_COMPILER_ARG_MODEL = getPublicStoreGroup().createStringDocument( evaluator, JAVAC_COMPILER_ARG );
// CustomizerJar
! DIST_JAR_MODEL = getPublicStoreGroup().createStringDocument( evaluator, DIST_JAR );
! BUILD_CLASSES_EXCLUDES_MODEL = getPublicStoreGroup().createStringDocument( evaluator, BUILD_CLASSES_EXCLUDES );
! JAR_COMPRESS_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAR_COMPRESS );
// CustomizerJavadoc
! JAVADOC_PRIVATE_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAVADOC_PRIVATE );
! JAVADOC_NO_TREE_MODEL = getPublicStoreGroup().createInverseToggleButtonModel( evaluator, JAVADOC_NO_TREE );
! JAVADOC_USE_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAVADOC_USE );
! JAVADOC_NO_NAVBAR_MODEL = getPublicStoreGroup().createInverseToggleButtonModel( evaluator, JAVADOC_NO_NAVBAR );
! JAVADOC_NO_INDEX_MODEL = getPublicStoreGroup().createInverseToggleButtonModel( evaluator, JAVADOC_NO_INDEX );
! JAVADOC_SPLIT_INDEX_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAVADOC_SPLIT_INDEX );
! JAVADOC_AUTHOR_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAVADOC_AUTHOR );
! JAVADOC_VERSION_MODEL = getPublicStoreGroup().createToggleButtonModel( evaluator, JAVADOC_VERSION );
! JAVADOC_WINDOW_TITLE_MODEL = getPublicStoreGroup().createStringDocument( evaluator, JAVADOC_WINDOW_TITLE );
//Hotfix of the issue #70058
//Should use the StoreGroup when the StoreGroup SPI will be extended to allow false default value in ToggleButtonModel
JAVADOC_PREVIEW_MODEL = createToggleButtonModel ( evaluator, JAVADOC_PREVIEW, kind);
javadocPreviewBooleanKind = kind[0];
! JAVADOC_ADDITIONALPARAM_MODEL = getPublicStoreGroup().createStringDocument( evaluator, JAVADOC_ADDITIONALPARAM );
// CustomizerRun
RUN_CONFIGS = readRunConfigs();
activeConfig = evaluator.getProperty("config");
***************
*** 330,336 ****
! private void storeProperties() throws IOException {
// Store special properties
// Modify the project dependencies properly
--- 322,328 ----
! protected void storeProperties() throws IOException {
// Store special properties
// Modify the project dependencies properly
***************
*** 356,363 ****
}
// Standard store of the properties
! projectGroup.store( projectProperties );
! privateGroup.store( privateProperties );
storeRunConfigs(RUN_CONFIGS, projectProperties, privateProperties);
EditableProperties ep = updateHelper.getProperties("nbproject/private/config.properties");
--- 348,354 ----
}
// Standard store of the properties
! storeProperties(projectProperties, privateProperties);
storeRunConfigs(RUN_CONFIGS, projectProperties, privateProperties);
EditableProperties ep = updateHelper.getProperties("nbproject/private/config.properties");
***************
*** 392,412 ****
projectProperties.remove( NO_DEPENDENCIES ); // Remove the property completely if not set
}
- storeAdditionalProperties(projectProperties);
-
// Store the property changes into the project
updateHelper.putProperties( AntProjectHelper.PROJECT_PROPERTIES_PATH, projectProperties );
! updateHelper.putProperties( AntProjectHelper.PRIVATE_PROPERTIES_PATH, privateProperties );
}
- private void storeAdditionalProperties(EditableProperties projectProperties) {
- for (Iterator i = additionalProperties.keySet().iterator(); i.hasNext();) {
- String key = (String) i.next();
- projectProperties.put(key, (String) additionalProperties.get(key));
- }
- }
-
private static String getDocumentText( Document document ) {
try {
return document.getText( 0, document.getLength() );
--- 383,396 ----
projectProperties.remove( NO_DEPENDENCIES ); // Remove the property completely if not set
}
// Store the property changes into the project
updateHelper.putProperties( AntProjectHelper.PROJECT_PROPERTIES_PATH, projectProperties );
! updateHelper.putProperties( AntProjectHelper.PRIVATE_PROPERTIES_PATH, privateProperties );
!
! notifyStoreActionListeners();
}
private static String getDocumentText( Document document ) {
try {
return document.getText( 0, document.getLength() );
***************
*** 490,500 ****
rootLabels[i] = (String) ((Vector)data.elementAt(i)).elementAt(1);
}
roots.putRoots(rootURLs,rootLabels);
- }
-
- /* This is used by CustomizerWSServiceHost */
- public void putAdditionalProperty(String propertyName, String propertyValue) {
- additionalProperties.setProperty(propertyName, propertyValue);
}
private static boolean showModifiedMessage (String title) {
--- 474,479 ----