Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 260459 | Differences between
and this patch

Collapse All | Expand All

(-)j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/IJ2EEModuleConstants.java (+3 lines)
Lines 29-32 Link Here
29
	public static final String JST_WEB_TEMPLATE = "template.jst.web"; //$NON-NLS-1$
29
	public static final String JST_WEB_TEMPLATE = "template.jst.web"; //$NON-NLS-1$
30
	public static final String WST_WEB_TEMPLATE = "template.wst.web"; //$NON-NLS-1$
30
	public static final String WST_WEB_TEMPLATE = "template.wst.web"; //$NON-NLS-1$
31
	public static final String JST_COMPONENT_FILE = "org.eclipse.wst.common.component";//$NON-NLS-1$
31
	public static final String JST_COMPONENT_FILE = "org.eclipse.wst.common.component";//$NON-NLS-1$
32
	public static final String USE_LTK_REFACTORING = "org.eclipse.jst.j2ee.useltkrefactoring";//$NON-NLS-1$
33
	public static final String TRUE_STRING = "true";//$NON-NLS-1$
34
	public static final String FALSE_STRING = "false";//$NON-NLS-1$
32
}
35
}
(-)j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPlugin.java (-9 / +16 lines)
Lines 517-531 Link Here
517
		
517
		
518
		final ProjectRefactoringListener listener = new ProjectRefactoringListener();//ProjectDependencyCache.getCache());
518
		final ProjectRefactoringListener listener = new ProjectRefactoringListener();//ProjectDependencyCache.getCache());
519
		// register the project rename/delete refactoring listener
519
		// register the project rename/delete refactoring listener
520
		ResourcesPlugin.getWorkspace().addResourceChangeListener(listener,
520
		String ltkRefactoring = System.getProperty(IJ2EEModuleConstants.USE_LTK_REFACTORING);
521
				IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
521
		if(ltkRefactoring != null && ltkRefactoring.equals(IJ2EEModuleConstants.TRUE_STRING)){
522
		
522
			ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
523
		// register the IElementChangedLister that updates the .component file in 
523
			// register the IElementChangedLister that updates the .component file in 
524
		// response to .classpath changes
524
			// response to .classpath changes
525
		JavaCore.addElementChangedListener(new J2EEElementChangedListener(), ElementChangedEvent.POST_CHANGE);
525
			JavaCore.addElementChangedListener(new J2EEElementChangedListener(), ElementChangedEvent.POST_CHANGE);
526
		
526
			ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEComponentClasspathUpdater.getInstance(), IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE);
527
		ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEComponentClasspathUpdater.getInstance(), IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
527
			ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEDependencyListener.INSTANCE, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE);
528
		ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEDependencyListener.INSTANCE, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
528
		} else{
529
				ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
530
				// register the IElementChangedLister that updates the .component file in 
531
				// response to .classpath changes
532
				JavaCore.addElementChangedListener(new J2EEElementChangedListener(), ElementChangedEvent.POST_CHANGE);
533
				ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEComponentClasspathUpdater.getInstance(), IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
534
				ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEDependencyListener.INSTANCE, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
535
		}
529
	}
536
	}
530
	
537
	
531
	public void stop(BundleContext context) throws Exception {
538
	public void stop(BundleContext context) throws Exception {

Return to bug 260459