Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 177867 Details for
Bug 324111
Need better enablement behavior for WTP library providers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed patch
324111.txt (text/plain), 25.33 KB, created by
Paul Fullbright
on 2010-08-31 13:26:19 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Paul Fullbright
Created:
2010-08-31 13:26:19 EDT
Size:
25.33 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.j2ee >Index: common/org/eclipse/jst/j2ee/internal/common/classpath/WtpOsgiBundlesLibraryProviderInstallOperationConfig.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/WtpOsgiBundlesLibraryProviderInstallOperationConfig.java,v >retrieving revision 1.2 >diff -u -r1.2 WtpOsgiBundlesLibraryProviderInstallOperationConfig.java >--- common/org/eclipse/jst/j2ee/internal/common/classpath/WtpOsgiBundlesLibraryProviderInstallOperationConfig.java 10 Jun 2009 19:19:05 -0000 1.2 >+++ common/org/eclipse/jst/j2ee/internal/common/classpath/WtpOsgiBundlesLibraryProviderInstallOperationConfig.java 31 Aug 2010 17:19:37 -0000 >@@ -29,6 +29,8 @@ > import org.eclipse.wst.common.project.facet.core.IProjectFacet; > import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; > import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; >+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent; >+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener; > > /** > * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a> >@@ -39,27 +41,44 @@ > extends OsgiBundlesLibraryProviderInstallOperationConfig > > { >+ private static final IProjectFacet WEB_FACET >+ = ProjectFacetsManager.getProjectFacet( IJ2EEFacetConstants.DYNAMIC_WEB ); >+ > private static final String CLASS_NAME > = WtpOsgiBundlesLibraryProviderInstallOperationConfig.class.getName(); > > public static final String PROP_INCLUDE_WITH_APPLICATION_ENABLED > = CLASS_NAME + ".INCLUDE_WITH_APPLICATION_ENABLED"; //$NON-NLS-1$ > >- private static final IProjectFacet WEB_FACET >- = ProjectFacetsManager.getProjectFacet( IJ2EEFacetConstants.DYNAMIC_WEB ); >+ private boolean includeWithApplicationEnabled; >+ >+ public static final String PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED >+ = CLASS_NAME + ".INCLUDE_WITH_APPLICATION_SETTING_ENABLED"; //$NON-NLS-1$ > >- private boolean includeWithApplication = true; >+ private boolean includeWithApplicationSettingEnabled; > > public boolean isIncludeWithApplicationEnabled() > { >- return this.includeWithApplication; >+ return this.includeWithApplicationEnabled; > } > >- public void setIncludeWithApplicationEnabled( final boolean includeWithApplication ) >+ public void setIncludeWithApplicationEnabled( final boolean value ) > { >- final boolean oldValue = this.includeWithApplication; >- this.includeWithApplication = includeWithApplication; >- notifyListeners( PROP_INCLUDE_WITH_APPLICATION_ENABLED, oldValue, this.includeWithApplication ); >+ final boolean oldValue = this.includeWithApplicationEnabled; >+ this.includeWithApplicationEnabled = value; >+ notifyListeners( PROP_INCLUDE_WITH_APPLICATION_ENABLED, oldValue, this.includeWithApplicationEnabled ); >+ } >+ >+ public boolean isIncludeWithApplicationSettingEnabled() >+ { >+ return this.includeWithApplicationSettingEnabled; >+ } >+ >+ public void setIncludeWithApplicationSettingEnabled( final boolean value ) >+ { >+ final boolean oldValue = this.includeWithApplicationSettingEnabled; >+ this.includeWithApplicationSettingEnabled = value; >+ notifyListeners( PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED, oldValue, this.includeWithApplicationSettingEnabled ); > } > > @Override >@@ -69,7 +88,7 @@ > { > super.init( fproj, fv, provider ); > >- this.includeWithApplication = true; >+ this.includeWithApplicationEnabled = isModuleFaceted( fproj ); > > final IProject project = fproj.getProject(); > >@@ -82,33 +101,64 @@ > > if( currentProvider == provider ) > { >- final IPath path = OsgiBundlesContainer.CONTAINER_PATH.append( f.getId() ); >- final IJavaProject jproj = JavaCore.create( project ); >+ this.includeWithApplicationEnabled = getIncludeWithApplicationSetting( project, f); >+ } >+ } >+ >+ this.includeWithApplicationSettingEnabled >+ = ( this.includeWithApplicationEnabled ) ? true : isModuleFaceted( fproj ); >+ >+ IFacetedProjectListener listener = new IFacetedProjectListener() >+ { >+ public void handleEvent( final IFacetedProjectEvent event ) >+ { >+ final boolean moduleFaceted = isModuleFaceted( event.getWorkingCopy() ); >+ setIncludeWithApplicationEnabled( moduleFaceted ); >+ setIncludeWithApplicationSettingEnabled( moduleFaceted ); >+ } >+ }; >+ >+ fproj.addListener( listener, IFacetedProjectEvent.Type.PROJECT_FACETS_CHANGED ); >+ } >+ >+ protected boolean isModuleFaceted( final IFacetedProjectBase fproj ) { >+ for( IProjectFacetVersion facetVersion : fproj.getProjectFacets() ) >+ { >+ if( ProjectFacetsManager.getGroup( "modules" ).getMembers().contains( facetVersion ) ) //$NON-NLS-1$ >+ { >+ return true; >+ } >+ } >+ return false; >+ } >+ >+ private static boolean getIncludeWithApplicationSetting( final IProject proj, final IProjectFacet f ) >+ { >+ final IPath path = OsgiBundlesContainer.CONTAINER_PATH.append( f.getId() ); >+ final IJavaProject jproj = JavaCore.create( proj ); > >- try >+ try >+ { >+ for( IClasspathEntry cpe : jproj.getRawClasspath() ) >+ { >+ if( path.equals( cpe.getPath() ) ) > { >- for( IClasspathEntry cpe : jproj.getRawClasspath() ) >+ for( IClasspathAttribute attr : cpe.getExtraAttributes() ) > { >- if( path.equals( cpe.getPath() ) ) >+ if( attr.getName().equals( IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY ) ) > { >- this.includeWithApplication = true; >- >- for( IClasspathAttribute attr : cpe.getExtraAttributes() ) >- { >- if( attr.getName().equals( IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY ) ) >- { >- this.includeWithApplication = false; >- } >- } >+ return true; > } > } > } >- catch( CoreException e ) >- { >- throw new RuntimeException( e ); >- } > } > } >+ catch( CoreException e ) >+ { >+ throw new RuntimeException( e ); >+ } >+ >+ return false; > } > > @Override >@@ -117,19 +167,20 @@ > final IFacetedProjectBase fproj = getFacetedProject(); > final boolean isWebProject = fproj.hasProjectFacet( WEB_FACET ); > >- final IClasspathAttribute attr; >- > if( isIncludeWithApplicationEnabled() ) > { >- attr = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY, >- ClasspathDependencyUtil.getDefaultRuntimePath( isWebProject ).toString() ); >+ final IClasspathAttribute attr >+ = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY, >+ ClasspathDependencyUtil.getDefaultRuntimePath( isWebProject ).toString() ); >+ return new IClasspathAttribute[] { attr }; > } >- else >+ else if ( isIncludeWithApplicationSettingEnabled() ) > { >- attr = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY, "" ); //$NON-NLS-1$ >+ final IClasspathAttribute attr >+ = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY, "" ); //$NON-NLS-1$ >+ return new IClasspathAttribute[] { attr }; > } > >- return new IClasspathAttribute[]{ attr }; >+ return new IClasspathAttribute[ 0 ]; > } >- > } >Index: common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperation.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperation.java,v >retrieving revision 1.3 >diff -u -r1.3 WtpUserLibraryProviderInstallOperation.java >--- common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperation.java 10 Jun 2009 19:19:05 -0000 1.3 >+++ common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperation.java 31 Aug 2010 17:19:37 -0000 >@@ -11,17 +11,10 @@ > > package org.eclipse.jst.j2ee.internal.common.classpath; > >-import org.eclipse.jdt.core.IClasspathAttribute; > import org.eclipse.jdt.core.IClasspathEntry; > import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryProviderInstallOperation; > import org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryProviderInstallOperationConfig; >-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil; >-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants; >-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants; >-import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase; >-import org.eclipse.wst.common.project.facet.core.IProjectFacet; >-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; > > /** > * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a> >@@ -32,9 +25,6 @@ > extends UserLibraryProviderInstallOperation > > { >- private static final IProjectFacet WEB_FACET >- = ProjectFacetsManager.getProjectFacet( IJ2EEFacetConstants.DYNAMIC_WEB ); >- > @Override > protected IClasspathEntry createClasspathEntry( final UserLibraryProviderInstallOperationConfig config, > final String libraryName ) >@@ -42,25 +32,9 @@ > final WtpUserLibraryProviderInstallOperationConfig cfg > = (WtpUserLibraryProviderInstallOperationConfig) config; > >- final IFacetedProjectBase fproj = cfg.getFacetedProject(); >- final boolean isWebProject = fproj.hasProjectFacet( WEB_FACET ); >- >- final IClasspathAttribute attr; >- >- if( cfg.isIncludeWithApplicationEnabled() ) >- { >- attr = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY, >- ClasspathDependencyUtil.getDefaultRuntimePath( isWebProject ).toString() ); >- } >- else >- { >- attr = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY, "" ); //$NON-NLS-1$ >- } >- >- IClasspathEntry cpe = super.createClasspathEntry( config, libraryName ); >- cpe = JavaCore.newContainerEntry( cpe.getPath(), null, new IClasspathAttribute[]{ attr }, false ); >+ IClasspathEntry cpe = super.createClasspathEntry( cfg, libraryName ); >+ cpe = JavaCore.newContainerEntry( cpe.getPath(), null, cfg.getClasspathAttributes(), false ); > > return cpe; > } >- > } >Index: common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperationConfig.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperationConfig.java,v >retrieving revision 1.2 >diff -u -r1.2 WtpUserLibraryProviderInstallOperationConfig.java >--- common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperationConfig.java 12 Nov 2008 21:08:24 -0000 1.2 >+++ common/org/eclipse/jst/j2ee/internal/common/classpath/WtpUserLibraryProviderInstallOperationConfig.java 31 Aug 2010 17:19:37 -0000 >@@ -12,7 +12,6 @@ > package org.eclipse.jst.j2ee.internal.common.classpath; > > import java.util.List; >- > import org.eclipse.core.resources.IProject; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IPath; >@@ -23,10 +22,15 @@ > import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider; > import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework; > import org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryProviderInstallOperationConfig; >+import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil; > import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants; >+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants; > import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase; > import org.eclipse.wst.common.project.facet.core.IProjectFacet; > import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; >+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager; >+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent; >+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener; > > /** > * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a> >@@ -37,24 +41,44 @@ > extends UserLibraryProviderInstallOperationConfig > > { >+ private static final IProjectFacet WEB_FACET >+ = ProjectFacetsManager.getProjectFacet( IJ2EEFacetConstants.DYNAMIC_WEB ); >+ > private static final String CLASS_NAME > = WtpUserLibraryProviderInstallOperationConfig.class.getName(); > > public static final String PROP_INCLUDE_WITH_APPLICATION_ENABLED > = CLASS_NAME + ".INCLUDE_WITH_APPLICATION_ENABLED"; //$NON-NLS-1$ > >- private boolean includeWithApplication = true; >+ private boolean includeWithApplicationEnabled; >+ >+ public static final String PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED >+ = CLASS_NAME + ".INCLUDE_WITH_APPLICATION_SETTING_ENABLED"; //$NON-NLS-1$ >+ >+ private boolean includeWithApplicationSettingEnabled; > > public boolean isIncludeWithApplicationEnabled() > { >- return this.includeWithApplication; >+ return this.includeWithApplicationEnabled; >+ } >+ >+ public void setIncludeWithApplicationEnabled( final boolean value ) >+ { >+ final boolean oldValue = this.includeWithApplicationEnabled; >+ this.includeWithApplicationEnabled = value; >+ notifyListeners( PROP_INCLUDE_WITH_APPLICATION_ENABLED, oldValue, this.includeWithApplicationEnabled ); >+ } >+ >+ public boolean isIncludeWithApplicationSettingEnabled() >+ { >+ return this.includeWithApplicationSettingEnabled; > } > >- public void setIncludeWithApplicationEnabled( final boolean includeWithApplication ) >+ public void setIncludeWithApplicationSettingEnabled( final boolean value ) > { >- final boolean oldValue = this.includeWithApplication; >- this.includeWithApplication = includeWithApplication; >- notifyListeners( PROP_INCLUDE_WITH_APPLICATION_ENABLED, oldValue, this.includeWithApplication ); >+ final boolean oldValue = this.includeWithApplicationSettingEnabled; >+ this.includeWithApplicationSettingEnabled = value; >+ notifyListeners( PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED, oldValue, this.includeWithApplicationSettingEnabled ); > } > > @Override >@@ -64,7 +88,7 @@ > { > super.init( fproj, fv, provider ); > >- this.includeWithApplication = true; >+ this.includeWithApplicationEnabled = isModuleFaceted( fproj ); > > final IProject project = fproj.getProject(); > >@@ -77,24 +101,50 @@ > > if( currentProvider == provider ) > { >- final List<IClasspathEntry> entries; >- >- try >- { >- entries = ClasspathUtil.getClasspathEntries( project, f ); >- } >- catch( CoreException e ) >- { >- throw new RuntimeException( e ); >- } >- >- this.includeWithApplication = getIncludeWithApplicationSetting( entries ); >+ this.includeWithApplicationEnabled = getIncludeWithApplicationSetting( project, f); >+ } >+ } >+ >+ this.includeWithApplicationSettingEnabled >+ = ( this.includeWithApplicationEnabled ) ? true : isModuleFaceted( fproj ); >+ >+ IFacetedProjectListener listener = new IFacetedProjectListener() >+ { >+ public void handleEvent( final IFacetedProjectEvent event ) >+ { >+ final boolean moduleFaceted = isModuleFaceted( event.getWorkingCopy() ); >+ setIncludeWithApplicationEnabled( moduleFaceted ); >+ setIncludeWithApplicationSettingEnabled( moduleFaceted ); >+ } >+ }; >+ >+ fproj.addListener( listener, IFacetedProjectEvent.Type.PROJECT_FACETS_CHANGED ); >+ } >+ >+ protected boolean isModuleFaceted( final IFacetedProjectBase fproj ) { >+ for( IProjectFacetVersion facetVersion : fproj.getProjectFacets() ) >+ { >+ if( ProjectFacetsManager.getGroup( "modules" ).getMembers().contains( facetVersion ) ) //$NON-NLS-1$ >+ { >+ return true; > } > } >+ return false; > } > >- private static boolean getIncludeWithApplicationSetting( final List<IClasspathEntry> entries ) >+ private static boolean getIncludeWithApplicationSetting( final IProject proj, final IProjectFacet f ) > { >+ final List<IClasspathEntry> entries; >+ >+ try >+ { >+ entries = ClasspathUtil.getClasspathEntries( proj, f ); >+ } >+ catch( CoreException e ) >+ { >+ throw new RuntimeException( e ); >+ } >+ > for( IClasspathEntry cpe : entries ) > { > if( cpe.getEntryKind() == IClasspathEntry.CPE_CONTAINER ) >@@ -105,17 +155,37 @@ > { > for( IClasspathAttribute attr : cpe.getExtraAttributes() ) > { >- if( attr.getName().equals( IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY ) ) >+ if( attr.getName().equals( IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY ) ) > { >- return false; >+ return true; > } > } > } > } > } > >- return true; >+ return false; > } > >- >+ public IClasspathAttribute[] getClasspathAttributes() >+ { >+ final IFacetedProjectBase fproj = getFacetedProject(); >+ final boolean isWebProject = fproj.hasProjectFacet( WEB_FACET ); >+ >+ if( isIncludeWithApplicationEnabled() ) >+ { >+ final IClasspathAttribute attr >+ = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY, >+ ClasspathDependencyUtil.getDefaultRuntimePath( isWebProject ).toString() ); >+ return new IClasspathAttribute[] { attr }; >+ } >+ else if ( isIncludeWithApplicationSettingEnabled() ) >+ { >+ final IClasspathAttribute attr >+ = JavaCore.newClasspathAttribute( IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY, "" ); //$NON-NLS-1$ >+ return new IClasspathAttribute[] { attr }; >+ } >+ >+ return new IClasspathAttribute[ 0 ]; >+ } > } >#P org.eclipse.jst.j2ee.ui >Index: j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java,v >retrieving revision 1.1 >diff -u -r1.1 WtpOsgiBundlesLibraryProviderInstallPanel.java >--- j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java 3 Feb 2009 02:33:16 -0000 1.1 >+++ j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java 31 Aug 2010 17:19:40 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jst.j2ee.internal.ui; > >+import static org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig.*; > import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener; > import org.eclipse.jst.common.project.facet.ui.libprov.osgi.OsgiBundlesLibraryProviderInstallPanel; > import org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperationConfig; >@@ -42,6 +43,7 @@ > final Button copyOnPublishCheckBox = new Button( composite, SWT.CHECK ); > copyOnPublishCheckBox.setText( Resources.copyLibraries ); > copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() ); >+ copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() ); > > copyOnPublishCheckBox.addSelectionListener > ( >@@ -61,11 +63,18 @@ > final Object oldValue, > final Object newValue ) > { >- copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() ); >+ if( PROP_INCLUDE_WITH_APPLICATION_ENABLED.equals( property )) >+ { >+ copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() ); >+ } >+ else if( PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED.equals( property ) ) >+ { >+ copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() ); >+ } > } > }; > >- cfg.addListener( listener, WtpOsgiBundlesLibraryProviderInstallOperationConfig.PROP_INCLUDE_WITH_APPLICATION_ENABLED ); >+ cfg.addListener( listener, PROP_INCLUDE_WITH_APPLICATION_ENABLED, PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED ); > > copyOnPublishCheckBox.addDisposeListener > ( >Index: j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java,v >retrieving revision 1.2 >diff -u -r1.2 WtpUserLibraryProviderInstallPanel.java >--- j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java 12 Nov 2008 21:08:29 -0000 1.2 >+++ j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java 31 Aug 2010 17:19:40 -0000 >@@ -11,6 +11,7 @@ > > package org.eclipse.jst.j2ee.internal.ui; > >+import static org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig.*; > import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener; > import org.eclipse.jst.common.project.facet.ui.libprov.user.UserLibraryProviderInstallPanel; > import org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig; >@@ -42,6 +43,7 @@ > final Button copyOnPublishCheckBox = new Button( composite, SWT.CHECK ); > copyOnPublishCheckBox.setText( Resources.copyLibraries ); > copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() ); >+ copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() ); > > copyOnPublishCheckBox.addSelectionListener > ( >@@ -61,11 +63,18 @@ > final Object oldValue, > final Object newValue ) > { >- copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() ); >+ if( PROP_INCLUDE_WITH_APPLICATION_ENABLED.equals( property )) >+ { >+ copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() ); >+ } >+ else if( PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED.equals( property ) ) >+ { >+ copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() ); >+ } > } > }; > >- cfg.addListener( listener, WtpUserLibraryProviderInstallOperationConfig.PROP_INCLUDE_WITH_APPLICATION_ENABLED ); >+ cfg.addListener( listener, PROP_INCLUDE_WITH_APPLICATION_ENABLED, PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED ); > > copyOnPublishCheckBox.addDisposeListener > (
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 324111
:
177867
|
177869