diff options
author | kchong | 2007-08-30 20:50:13 +0000 |
---|---|---|
committer | kchong | 2007-08-30 20:50:13 +0000 |
commit | 8d3a84bed295bf726248c9120c11af88a1b72e64 (patch) | |
tree | 7d84f577f998a15ee57f13b54bfdfeec9c021032 | |
parent | 2317f0bf4d317d5ba39194604ecfc4a944ecf4a8 (diff) | |
download | webtools.sourceediting-8d3a84bed295bf726248c9120c11af88a1b72e64.tar.gz webtools.sourceediting-8d3a84bed295bf726248c9120c11af88a1b72e64.tar.xz webtools.sourceediting-8d3a84bed295bf726248c9120c11af88a1b72e64.zip |
[148842] Eclipse no longer detects files modified outside of the IDE
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java | 72 |
1 files changed, 44 insertions, 28 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java index c6eb7a9d7f..d793dcaf43 100644 --- a/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java +++ b/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java @@ -731,10 +731,8 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen } - /** - * Internal part activation listener, copied from AbstractTextEditor - */ - class ActivationListener implements IPartListener, IWindowListener { + protected class ActivationListener implements IPartListener, IWindowListener + { /** Cache of the active workbench part. */ private IWorkbenchPart fActivePart; @@ -751,10 +749,11 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen * Creates this activation listener. * * @param partService - * the part service on which to add the part listener + * the part service on which to add the part listener * @since 3.1 */ - public ActivationListener(IPartService partService) { + public ActivationListener(IPartService partService) + { fPartService = partService; fPartService.addPartListener(this); PlatformUI.getWorkbench().addWindowListener(this); @@ -765,7 +764,8 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen * * @since 3.1 */ - public void dispose() { + public void dispose() + { fPartService.removePartListener(this); PlatformUI.getWorkbench().removeWindowListener(this); fPartService = null; @@ -774,7 +774,8 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen /* * @see IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart) */ - public void partActivated(IWorkbenchPart part) { + public void partActivated(IWorkbenchPart part) + { fActivePart = part; handleActivation(); } @@ -782,46 +783,54 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen /* * @see IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart) */ - public void partBroughtToTop(IWorkbenchPart part) { + public void partBroughtToTop(IWorkbenchPart part) + { // do nothing } /* * @see IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart) */ - public void partClosed(IWorkbenchPart part) { + public void partClosed(IWorkbenchPart part) + { // do nothing } /* * @see IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart) */ - public void partDeactivated(IWorkbenchPart part) { + public void partDeactivated(IWorkbenchPart part) + { fActivePart = null; } /* * @see IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart) */ - public void partOpened(IWorkbenchPart part) { + public void partOpened(IWorkbenchPart part) + { // do nothing } /** - * Handles the activation triggering a element state check in the - * editor. + * Handles the activation triggering a element state check in the editor. */ - void handleActivation() { - if (fIsHandlingActivation || (getTextEditor() == null)) { + void handleActivation() + { + if (fIsHandlingActivation || (getTextEditor() == null)) + { return; } - if (fActivePart == CommonMultiPageEditor.this) { + if (fActivePart == CommonMultiPageEditor.this) + { fIsHandlingActivation = true; - try { + try + { getTextEditor().safelySanityCheckState(getEditorInput()); } - finally { + finally + { fIsHandlingActivation = false; } } @@ -831,15 +840,19 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow) * @since 3.1 */ - public void windowActivated(IWorkbenchWindow window) { - if (window == getEditorSite().getWorkbenchWindow()) { + public void windowActivated(IWorkbenchWindow window) + { + if (window == getEditorSite().getWorkbenchWindow()) + { /* * Workaround for problem described in - * http://dev.eclipse.org/bugs/show_bug.cgi?id=11731 Will be - * removed when SWT has solved the problem. + * http://dev.eclipse.org/bugs/show_bug.cgi?id=11731 Will be removed + * when SWT has solved the problem. */ - window.getShell().getDisplay().asyncExec(new Runnable() { - public void run() { + window.getShell().getDisplay().asyncExec(new Runnable() + { + public void run() + { handleActivation(); } }); @@ -850,7 +863,8 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow) * @since 3.1 */ - public void windowDeactivated(IWorkbenchWindow window) { + public void windowDeactivated(IWorkbenchWindow window) + { // do nothing } @@ -858,7 +872,8 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow) * @since 3.1 */ - public void windowClosed(IWorkbenchWindow window) { + public void windowClosed(IWorkbenchWindow window) + { // do nothing } @@ -866,7 +881,8 @@ public abstract class CommonMultiPageEditor extends MultiPageEditorPart implemen * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow) * @since 3.1 */ - public void windowOpened(IWorkbenchWindow window) { + public void windowOpened(IWorkbenchWindow window) + { // do nothing } } |