Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java28
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java11
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java28
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java11
4 files changed, 52 insertions, 26 deletions
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 d6c702aad..efd6e3352 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
@@ -88,7 +88,7 @@ import org.eclipse.compare.structuremergeviewer.*;
*/
public abstract class CompareEditorInput implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress {
- private static final boolean STRUCTURE_COMPARE_ON_SINGLE_CLICK= true;
+
/**
* The name of the "dirty" property.
*/
@@ -115,6 +115,8 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
private IgnoreWhiteSpaceAction fIgnoreWhitespace;
private ShowPseudoConflicts fShowPseudoConflicts;
+
+ boolean fStructureCompareOnSingleClick= false;
/**
* Creates a <code>CompareEditorInput</code> which is initialized with the given
@@ -138,6 +140,10 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
}
};
}
+
+ private boolean structureCompareOnSingleClick() {
+ return fStructureCompareOnSingleClick;
+ }
/* (non Javadoc)
* see IAdaptable.getAdapter
@@ -395,15 +401,15 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
}
);
- /*
- fStructureInputPane.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- feedDefault1(e.getSelection());
+ if (!structureCompareOnSingleClick()) {
+ fStructureInputPane.addDoubleClickListener(
+ new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent e) {
+ feedDefault1(e.getSelection());
+ }
}
- }
- );
- */
+ );
+ }
// setup the wiring for second pane
fStructurePane1.addSelectionChangedListener(
@@ -465,7 +471,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
fStructurePane1.setInput(null);
} else {
Object input= getElement(selection);
- if (STRUCTURE_COMPARE_ON_SINGLE_CLICK) {
+ if (structureCompareOnSingleClick()) {
fStructurePane1.setInput(input);
//if (fStructurePane1.isEmpty())
fContentInputPane.setInput(input);
@@ -481,7 +487,6 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
);
}
- /*
private void feedDefault1(final ISelection selection) {
BusyIndicator.showWhile(fComposite.getDisplay(),
new Runnable() {
@@ -492,7 +497,6 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
}
);
}
- */
private void feed2(final ISelection selection) {
BusyIndicator.showWhile(fComposite.getDisplay(),
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index c2d5264b3..c7d71a602 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -24,6 +24,8 @@ public class Patcher {
private static final boolean DEBUG= false;
private static final String DEV_NULL= "/dev/null"; //$NON-NLS-1$
+
+ //private static final String MARKER_TYPE= "rejectedPatchMarker";
// diff formats
private static final int CONTEXT= 0;
@@ -789,7 +791,14 @@ public class Patcher {
} else
pp= new Path(path.lastSegment() + ".rej"); //$NON-NLS-1$
file= createPath(container, pp);
- updateFile(getRejected(failed), file, pm);
+ if (file != null) {
+ updateFile(getRejected(failed), file, pm);
+// try {
+// IMarker marker= file.createMarker(MARKER_TYPE);
+// marker.setAttribute(marker.MESSAGE, "rejected patch");
+// } catch (CoreException ex) {
+// }
+ }
}
}
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 d6c702aad..efd6e3352 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
@@ -88,7 +88,7 @@ import org.eclipse.compare.structuremergeviewer.*;
*/
public abstract class CompareEditorInput implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress {
- private static final boolean STRUCTURE_COMPARE_ON_SINGLE_CLICK= true;
+
/**
* The name of the "dirty" property.
*/
@@ -115,6 +115,8 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
private IgnoreWhiteSpaceAction fIgnoreWhitespace;
private ShowPseudoConflicts fShowPseudoConflicts;
+
+ boolean fStructureCompareOnSingleClick= false;
/**
* Creates a <code>CompareEditorInput</code> which is initialized with the given
@@ -138,6 +140,10 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
}
};
}
+
+ private boolean structureCompareOnSingleClick() {
+ return fStructureCompareOnSingleClick;
+ }
/* (non Javadoc)
* see IAdaptable.getAdapter
@@ -395,15 +401,15 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
}
);
- /*
- fStructureInputPane.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- feedDefault1(e.getSelection());
+ if (!structureCompareOnSingleClick()) {
+ fStructureInputPane.addDoubleClickListener(
+ new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent e) {
+ feedDefault1(e.getSelection());
+ }
}
- }
- );
- */
+ );
+ }
// setup the wiring for second pane
fStructurePane1.addSelectionChangedListener(
@@ -465,7 +471,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
fStructurePane1.setInput(null);
} else {
Object input= getElement(selection);
- if (STRUCTURE_COMPARE_ON_SINGLE_CLICK) {
+ if (structureCompareOnSingleClick()) {
fStructurePane1.setInput(input);
//if (fStructurePane1.isEmpty())
fContentInputPane.setInput(input);
@@ -481,7 +487,6 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
);
}
- /*
private void feedDefault1(final ISelection selection) {
BusyIndicator.showWhile(fComposite.getDisplay(),
new Runnable() {
@@ -492,7 +497,6 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
}
);
}
- */
private void feed2(final ISelection selection) {
BusyIndicator.showWhile(fComposite.getDisplay(),
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index c2d5264b3..c7d71a602 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -24,6 +24,8 @@ public class Patcher {
private static final boolean DEBUG= false;
private static final String DEV_NULL= "/dev/null"; //$NON-NLS-1$
+
+ //private static final String MARKER_TYPE= "rejectedPatchMarker";
// diff formats
private static final int CONTEXT= 0;
@@ -789,7 +791,14 @@ public class Patcher {
} else
pp= new Path(path.lastSegment() + ".rej"); //$NON-NLS-1$
file= createPath(container, pp);
- updateFile(getRejected(failed), file, pm);
+ if (file != null) {
+ updateFile(getRejected(failed), file, pm);
+// try {
+// IMarker marker= file.createMarker(MARKER_TYPE);
+// marker.setAttribute(marker.MESSAGE, "rejected patch");
+// } catch (CoreException ex) {
+// }
+ }
}
}

Back to the top