Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-06-07 11:14:42 +0000
committerAndre Weinand2002-06-07 11:14:42 +0000
commit45d38396b484f1c786a0f2f8d3b76d82eed34f59 (patch)
tree2f5679993a3d8bffccde289ee45b8907190f8408
parent2c73fa4312a55e2aed1c15b8d34efd165a3c82bc (diff)
downloadeclipse.platform.team-45d38396b484f1c786a0f2f8d3b76d82eed34f59.tar.gz
eclipse.platform.team-45d38396b484f1c786a0f2f8d3b76d82eed34f59.tar.xz
eclipse.platform.team-45d38396b484f1c786a0f2f8d3b76d82eed34f59.zip
#13730, #14952v20020607
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html28
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java72
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java50
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java15
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html28
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java72
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java50
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java15
8 files changed, 230 insertions, 100 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index 5d09e301c..4bb3c3545 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/buildnotes_compare.html
@@ -11,6 +11,34 @@
<h1>
Eclipse Platform Build Notes<br>
Compare</h1>
+Eclipse Build Input June 7th 2002
+
+<h2>
+What's new in this drop</h2>
+
+<h3>
+API changes</h3>
+
+<h3>
+API Additions</h3>
+
+<h3>
+Other highlights</h3>
+
+<h2>
+Known deficiencies</h2>
+
+<h2>
+Problem reports fixed</h2>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13730">#13730</a>: Entire zipfiles content sent prior when computing synchronization view content<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14952">#14952</a>: Diff Browser Opens Too Small / Not Easily Resizable<br>
+
+
+<h2>
+Problem reports closed</h2>
+
+<h1>
+<hr WIDTH="100%"></h1>
Eclipse Build Input June 6th 2002
<h2>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
index 72e09890e..c7fb5072f 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
@@ -406,47 +406,56 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
fComposite.layout();
// setup the wiring for top left pane
- fStructureInputPane.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feed1(e.getSelection());
+ fStructureInputPane.addOpenListener(
+ new IOpenListener() {
+ public void open(OpenEvent oe) {
+ feed1(oe.getSelection());
}
}
);
-
- if (!structureCompareOnSingleClick()) {
- fStructureInputPane.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- feedDefault1(e.getSelection());
- }
+ fStructureInputPane.addDoubleClickListener(
+ new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ feedDefault1(event.getSelection());
}
- );
- }
-
+ }
+ );
+
// setup the wiring for second pane
- fStructurePane1.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feed2(e.getSelection());
+ fStructurePane1.addOpenListener(
+ new IOpenListener() {
+ public void open(OpenEvent oe) {
+ feed2(oe.getSelection());
}
}
);
// setup the wiring for third pane
- fStructurePane2.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feed3(e.getSelection());
+ fStructurePane2.addOpenListener(
+ new IOpenListener() {
+ public void open(OpenEvent oe) {
+ feed3(oe.getSelection());
}
}
);
- // now deal with activation
+ // now deal with activation/deactivation
Listener activationListener= new Listener() {
+ int fOldOpenStrategy;
+
public void handleEvent(Event event) {
if (event.widget instanceof CompareViewerSwitchingPane) {
- fFocusPane= (CompareViewerSwitchingPane) event.widget;
+
+ switch (event.type) {
+ case SWT.Activate:
+ fFocusPane= (CompareViewerSwitchingPane) event.widget;
+ fOldOpenStrategy= OpenStrategy.getOpenMethod();
+ OpenStrategy.setOpenMethod(OpenStrategy.SINGLE_CLICK | OpenStrategy.ARROW_KEYS_OPEN);
+ break;
+ case SWT.Deactivate:
+ OpenStrategy.setOpenMethod(fOldOpenStrategy);
+ break;
+ }
}
}
};
@@ -454,12 +463,15 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
fStructurePane1.addListener(SWT.Activate, activationListener);
fStructurePane2.addListener(SWT.Activate, activationListener);
fContentInputPane.addListener(SWT.Activate, activationListener);
-
- if (fInput instanceof ICompareInput) {
- ICompareInput input2= (ICompareInput) fInput;
- fStructureInputPane.setInput(input2);
- feed1(fStructureInputPane.getSelection());
- }
+
+ fStructureInputPane.addListener(SWT.Deactivate, activationListener);
+ fStructurePane1.addListener(SWT.Deactivate, activationListener);
+ fStructurePane2.addListener(SWT.Deactivate, activationListener);
+ fContentInputPane.addListener(SWT.Deactivate, activationListener);
+
+
+ if (fInput instanceof ICompareInput)
+ fStructureInputPane.setInput((ICompareInput) fInput);
fComposite.setData("Nav", //$NON-NLS-1$
new CompareViewerSwitchingPane[] {
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
index 1d99df3d7..7baa256d9 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
@@ -34,12 +34,20 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
private Viewer fViewer;
private Object fInput;
private ListenerList fSelectionListeners= new ListenerList();
- private ListenerList fOpenListeners= new ListenerList();
+ private ListenerList fDoubleClickListener= new ListenerList();
+ private ListenerList fOpenListener= new ListenerList();
private boolean fControlVisibility= false;
private String fTitle;
private String fTitleArgument;
-
-
+
+ private IOpenListener fOpenHandler= new IOpenListener() {
+ public void open(OpenEvent event) {
+ Object[] listeners= fOpenListener.getListeners();
+ for (int i= 0; i < listeners.length; i++)
+ ((IOpenListener) listeners[i]).open(event);
+ }
+ };
+
/**
* Creates a <code>CompareViewerSwitchingPane</code> as a child of the given parent and with the
* specified SWT style bits.
@@ -64,8 +72,11 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
public void widgetDisposed(DisposeEvent e) {
if (fViewer instanceof ISelectionProvider)
((ISelectionProvider) fViewer).removeSelectionChangedListener(CompareViewerSwitchingPane.this);
- if (fViewer instanceof StructuredViewer)
- ((StructuredViewer) fViewer).removeDoubleClickListener(CompareViewerSwitchingPane.this);
+ if (fViewer instanceof StructuredViewer) {
+ StructuredViewer sv= (StructuredViewer) fViewer;
+ sv.removeDoubleClickListener(CompareViewerSwitchingPane.this);
+ sv.removeOpenListener(fOpenHandler);
+ }
fViewer= null;
fInput= null;
fSelectionListeners= null;
@@ -96,8 +107,11 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
if (fViewer instanceof ISelectionProvider)
((ISelectionProvider) fViewer).removeSelectionChangedListener(this);
- if (fViewer instanceof StructuredViewer)
- ((StructuredViewer)fViewer).removeDoubleClickListener(this);
+ if (fViewer instanceof StructuredViewer) {
+ StructuredViewer sv= (StructuredViewer) fViewer;
+ sv.removeDoubleClickListener(this);
+ sv.removeOpenListener(fOpenHandler);
+ }
Control content= getContent();
setContent(null);
@@ -124,9 +138,13 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
if (fViewer instanceof ISelectionProvider)
((ISelectionProvider) fViewer).addSelectionChangedListener(this);
- if (fViewer instanceof StructuredViewer)
- ((StructuredViewer)fViewer).addDoubleClickListener(this);
+ if (fViewer instanceof StructuredViewer) {
+ StructuredViewer sv= (StructuredViewer) fViewer;
+ sv.addDoubleClickListener(this);
+ sv.addOpenListener(fOpenHandler);
+ }
+
if (oldEmpty != newEmpty) { // relayout my container
Composite parent= getParent();
if (parent instanceof Splitter)
@@ -158,15 +176,23 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
}
public void addDoubleClickListener(IDoubleClickListener l) {
- fOpenListeners.add(l);
+ fDoubleClickListener.add(l);
}
public void removeDoubleClickListener(IDoubleClickListener l) {
- fOpenListeners.remove(l);
+ fDoubleClickListener.remove(l);
+ }
+
+ public void addOpenListener(IOpenListener l) {
+ fOpenListener.add(l);
+ }
+
+ public void removeOpenListener(IOpenListener l) {
+ fOpenListener.remove(l);
}
public void doubleClick(DoubleClickEvent event) {
- Object[] listeners= fOpenListeners.getListeners();
+ Object[] listeners= fDoubleClickListener.getListeners();
for (int i= 0; i < listeners.length; i++)
((IDoubleClickListener) listeners[i]).doubleClick(event);
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
index 3f21c5ace..26e5fe34d 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
@@ -45,14 +45,6 @@ public abstract class ResizableDialog extends Dialog {
final Shell s= getShell();
if (s != null) {
- s.addShellListener(
- new ShellAdapter() {
- public void shellClosed(ShellEvent arg0) {
- if (fNewBounds != null)
- saveBounds(fNewBounds);
- }
- }
- );
s.addControlListener(
new ControlListener() {
public void controlMoved(ControlEvent arg0) {
@@ -123,6 +115,13 @@ public abstract class ResizableDialog extends Dialog {
return loc;
}
+ public boolean close() {
+ boolean closed= super.close();
+ if (closed && fNewBounds != null)
+ saveBounds(fNewBounds);
+ return closed;
+ }
+
private void saveBounds(Rectangle bounds) {
IDialogSettings dialogBounds= fSettings.getSection(DIALOG_BOUNDS_KEY);
if (dialogBounds == null) {
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index 5d09e301c..4bb3c3545 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -11,6 +11,34 @@
<h1>
Eclipse Platform Build Notes<br>
Compare</h1>
+Eclipse Build Input June 7th 2002
+
+<h2>
+What's new in this drop</h2>
+
+<h3>
+API changes</h3>
+
+<h3>
+API Additions</h3>
+
+<h3>
+Other highlights</h3>
+
+<h2>
+Known deficiencies</h2>
+
+<h2>
+Problem reports fixed</h2>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13730">#13730</a>: Entire zipfiles content sent prior when computing synchronization view content<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14952">#14952</a>: Diff Browser Opens Too Small / Not Easily Resizable<br>
+
+
+<h2>
+Problem reports closed</h2>
+
+<h1>
+<hr WIDTH="100%"></h1>
Eclipse Build Input June 6th 2002
<h2>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
index 72e09890e..c7fb5072f 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
@@ -406,47 +406,56 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
fComposite.layout();
// setup the wiring for top left pane
- fStructureInputPane.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feed1(e.getSelection());
+ fStructureInputPane.addOpenListener(
+ new IOpenListener() {
+ public void open(OpenEvent oe) {
+ feed1(oe.getSelection());
}
}
);
-
- if (!structureCompareOnSingleClick()) {
- fStructureInputPane.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- feedDefault1(e.getSelection());
- }
+ fStructureInputPane.addDoubleClickListener(
+ new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ feedDefault1(event.getSelection());
}
- );
- }
-
+ }
+ );
+
// setup the wiring for second pane
- fStructurePane1.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feed2(e.getSelection());
+ fStructurePane1.addOpenListener(
+ new IOpenListener() {
+ public void open(OpenEvent oe) {
+ feed2(oe.getSelection());
}
}
);
// setup the wiring for third pane
- fStructurePane2.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feed3(e.getSelection());
+ fStructurePane2.addOpenListener(
+ new IOpenListener() {
+ public void open(OpenEvent oe) {
+ feed3(oe.getSelection());
}
}
);
- // now deal with activation
+ // now deal with activation/deactivation
Listener activationListener= new Listener() {
+ int fOldOpenStrategy;
+
public void handleEvent(Event event) {
if (event.widget instanceof CompareViewerSwitchingPane) {
- fFocusPane= (CompareViewerSwitchingPane) event.widget;
+
+ switch (event.type) {
+ case SWT.Activate:
+ fFocusPane= (CompareViewerSwitchingPane) event.widget;
+ fOldOpenStrategy= OpenStrategy.getOpenMethod();
+ OpenStrategy.setOpenMethod(OpenStrategy.SINGLE_CLICK | OpenStrategy.ARROW_KEYS_OPEN);
+ break;
+ case SWT.Deactivate:
+ OpenStrategy.setOpenMethod(fOldOpenStrategy);
+ break;
+ }
}
}
};
@@ -454,12 +463,15 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
fStructurePane1.addListener(SWT.Activate, activationListener);
fStructurePane2.addListener(SWT.Activate, activationListener);
fContentInputPane.addListener(SWT.Activate, activationListener);
-
- if (fInput instanceof ICompareInput) {
- ICompareInput input2= (ICompareInput) fInput;
- fStructureInputPane.setInput(input2);
- feed1(fStructureInputPane.getSelection());
- }
+
+ fStructureInputPane.addListener(SWT.Deactivate, activationListener);
+ fStructurePane1.addListener(SWT.Deactivate, activationListener);
+ fStructurePane2.addListener(SWT.Deactivate, activationListener);
+ fContentInputPane.addListener(SWT.Deactivate, activationListener);
+
+
+ if (fInput instanceof ICompareInput)
+ fStructureInputPane.setInput((ICompareInput) fInput);
fComposite.setData("Nav", //$NON-NLS-1$
new CompareViewerSwitchingPane[] {
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
index 1d99df3d7..7baa256d9 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
@@ -34,12 +34,20 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
private Viewer fViewer;
private Object fInput;
private ListenerList fSelectionListeners= new ListenerList();
- private ListenerList fOpenListeners= new ListenerList();
+ private ListenerList fDoubleClickListener= new ListenerList();
+ private ListenerList fOpenListener= new ListenerList();
private boolean fControlVisibility= false;
private String fTitle;
private String fTitleArgument;
-
-
+
+ private IOpenListener fOpenHandler= new IOpenListener() {
+ public void open(OpenEvent event) {
+ Object[] listeners= fOpenListener.getListeners();
+ for (int i= 0; i < listeners.length; i++)
+ ((IOpenListener) listeners[i]).open(event);
+ }
+ };
+
/**
* Creates a <code>CompareViewerSwitchingPane</code> as a child of the given parent and with the
* specified SWT style bits.
@@ -64,8 +72,11 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
public void widgetDisposed(DisposeEvent e) {
if (fViewer instanceof ISelectionProvider)
((ISelectionProvider) fViewer).removeSelectionChangedListener(CompareViewerSwitchingPane.this);
- if (fViewer instanceof StructuredViewer)
- ((StructuredViewer) fViewer).removeDoubleClickListener(CompareViewerSwitchingPane.this);
+ if (fViewer instanceof StructuredViewer) {
+ StructuredViewer sv= (StructuredViewer) fViewer;
+ sv.removeDoubleClickListener(CompareViewerSwitchingPane.this);
+ sv.removeOpenListener(fOpenHandler);
+ }
fViewer= null;
fInput= null;
fSelectionListeners= null;
@@ -96,8 +107,11 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
if (fViewer instanceof ISelectionProvider)
((ISelectionProvider) fViewer).removeSelectionChangedListener(this);
- if (fViewer instanceof StructuredViewer)
- ((StructuredViewer)fViewer).removeDoubleClickListener(this);
+ if (fViewer instanceof StructuredViewer) {
+ StructuredViewer sv= (StructuredViewer) fViewer;
+ sv.removeDoubleClickListener(this);
+ sv.removeOpenListener(fOpenHandler);
+ }
Control content= getContent();
setContent(null);
@@ -124,9 +138,13 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
if (fViewer instanceof ISelectionProvider)
((ISelectionProvider) fViewer).addSelectionChangedListener(this);
- if (fViewer instanceof StructuredViewer)
- ((StructuredViewer)fViewer).addDoubleClickListener(this);
+ if (fViewer instanceof StructuredViewer) {
+ StructuredViewer sv= (StructuredViewer) fViewer;
+ sv.addDoubleClickListener(this);
+ sv.addOpenListener(fOpenHandler);
+ }
+
if (oldEmpty != newEmpty) { // relayout my container
Composite parent= getParent();
if (parent instanceof Splitter)
@@ -158,15 +176,23 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane
}
public void addDoubleClickListener(IDoubleClickListener l) {
- fOpenListeners.add(l);
+ fDoubleClickListener.add(l);
}
public void removeDoubleClickListener(IDoubleClickListener l) {
- fOpenListeners.remove(l);
+ fDoubleClickListener.remove(l);
+ }
+
+ public void addOpenListener(IOpenListener l) {
+ fOpenListener.add(l);
+ }
+
+ public void removeOpenListener(IOpenListener l) {
+ fOpenListener.remove(l);
}
public void doubleClick(DoubleClickEvent event) {
- Object[] listeners= fOpenListeners.getListeners();
+ Object[] listeners= fDoubleClickListener.getListeners();
for (int i= 0; i < listeners.length; i++)
((IDoubleClickListener) listeners[i]).doubleClick(event);
}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
index 3f21c5ace..26e5fe34d 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
@@ -45,14 +45,6 @@ public abstract class ResizableDialog extends Dialog {
final Shell s= getShell();
if (s != null) {
- s.addShellListener(
- new ShellAdapter() {
- public void shellClosed(ShellEvent arg0) {
- if (fNewBounds != null)
- saveBounds(fNewBounds);
- }
- }
- );
s.addControlListener(
new ControlListener() {
public void controlMoved(ControlEvent arg0) {
@@ -123,6 +115,13 @@ public abstract class ResizableDialog extends Dialog {
return loc;
}
+ public boolean close() {
+ boolean closed= super.close();
+ if (closed && fNewBounds != null)
+ saveBounds(fNewBounds);
+ return closed;
+ }
+
private void saveBounds(Rectangle bounds) {
IDialogSettings dialogBounds= fSettings.getSection(DIALOG_BOUNDS_KEY);
if (dialogBounds == null) {

Back to the top