Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-10-25 14:51:31 -0400
committerSergey Prigogin2016-10-29 14:07:47 -0400
commit8188dd461793e5c391a708afebbf8d28a93837a0 (patch)
treebcd4e67e8f296f8416f53a9d534fd350225d23ba
parent72807f9d1ce8366b103d8dab892fd55388286d42 (diff)
downloadeclipse.platform.team-8188dd461793e5c391a708afebbf8d28a93837a0.tar.gz
eclipse.platform.team-8188dd461793e5c391a708afebbf8d28a93837a0.tar.xz
eclipse.platform.team-8188dd461793e5c391a708afebbf8d28a93837a0.zip
Bug 506523 - Add @Override to org.eclipse.compare.examples.xml
Change-Id: I704c0760d123964cc5bbd06ac7aa5852ac908eb5 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java14
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java1
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java1
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java3
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java5
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java16
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java3
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java45
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java11
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java1
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java1
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java9
-rw-r--r--examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java4
22 files changed, 127 insertions, 15 deletions
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java
index d04bf9d7a..000559ffc 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java
@@ -106,6 +106,7 @@ public abstract class AbstractMatching {
/*
* @see IRangeComparator#getRangeCount()
*/
+ @Override
public int getRangeCount() {
return fXML_elements.length;
}
@@ -113,6 +114,7 @@ public abstract class AbstractMatching {
/*
* @see IRangeComparator#rangesEqual(int, IRangeComparator, int)
*/
+ @Override
public boolean rangesEqual(
int thisIndex,
IRangeComparator other_irc,
@@ -146,6 +148,7 @@ public abstract class AbstractMatching {
/*
* @see IRangeComparator#skipRangeComparison(int, int, IRangeComparator)
*/
+ @Override
public boolean skipRangeComparison(
int length,
int maxLength,
@@ -169,6 +172,7 @@ public abstract class AbstractMatching {
fy = y;
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof Match) {
Match m = (Match) obj;
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java
index 0e4b257ea..a1cbc8e3e 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java
@@ -30,11 +30,13 @@ public class AttributesImpl implements Attributes {
/* Returns the number of attributes. */
+ @Override
public int getLength() {
return fLength;
}
/* Returns the index of the specified attribute. */
+ @Override
public int getIndex(String raw) {
ListNode place= fHead;
int index= 0;
@@ -49,6 +51,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the index of the specified attribute. */
+ @Override
public int getIndex(String uri, String local) {
ListNode place= fHead;
int index= 0;
@@ -63,6 +66,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute URI by index. */
+ @Override
public String getURI(int index) {
ListNode node= getListNodeAt(index);
@@ -70,6 +74,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute local name by index. */
+ @Override
public String getLocalName(int index) {
ListNode node= getListNodeAt(index);
@@ -77,6 +82,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute raw name by index. */
+ @Override
public String getQName(int index) {
ListNode node= getListNodeAt(index);
@@ -85,6 +91,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute type by index. */
+ @Override
public String getType(int index) {
ListNode node= getListNodeAt(index);
@@ -92,6 +99,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute type by uri and local. */
+ @Override
public String getType(String uri, String local) {
ListNode node= getListNode(uri, local);
@@ -100,6 +108,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute type by raw name. */
+ @Override
public String getType(String raw) {
ListNode node= getListNode(raw);
@@ -107,6 +116,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute value by index. */
+ @Override
public String getValue(int index) {
ListNode node= getListNodeAt(index);
@@ -114,6 +124,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute value by uri and local. */
+ @Override
public String getValue(String uri, String local) {
ListNode node= getListNode(uri, local);
@@ -121,6 +132,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns the attribute value by raw name. */
+ @Override
public String getValue(String raw) {
ListNode node= getListNode(raw);
@@ -266,6 +278,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns a string representation of this object. */
+ @Override
public String toString() {
StringBuffer str= new StringBuffer();
@@ -324,6 +337,7 @@ public class AttributesImpl implements Attributes {
}
/* Returns string representation of this object. */
+ @Override
public String toString() {
return raw != null ? raw : local;
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
index cd2f2d686..bb96885bb 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java
@@ -33,14 +33,17 @@ class ChooseMatcherDropDownAction extends Action implements IMenuCreator {
setMenuCreator(this);
}
+ @Override
public void dispose() {
// nothing to do
}
+ @Override
public Menu getMenu(Menu parent) {
return null;
}
+ @Override
public Menu getMenu(Control parent) {
XMLPlugin plugin= XMLPlugin.getDefault();
Menu menu= new Menu(parent);
@@ -93,6 +96,7 @@ class ChooseMatcherDropDownAction extends Action implements IMenuCreator {
item.fill(parent, -1);
}
+ @Override
public void run() {
fViewer.contentChanged();
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
index f7741b17e..d7ffa44a7 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java
@@ -29,6 +29,7 @@ public class CreateNewIdMapAction extends Action {
setToolTipText(XMLCompareMessages.XMLStructureViewer_newtask);
}
+ @Override
public void run() {
XMLPlugin plugin= XMLPlugin.getDefault();
fIdMapsInternal= plugin.getIdMapsInternal();//fIdMapsInternal is only read, not modified
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java
index 96c4f721e..f17f2ac2c 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java
@@ -80,6 +80,7 @@ public class IdMap {
/*
* @see Object#equals(Object)
*/
+ @Override
public boolean equals(Object object) {
if (!(object instanceof IdMap))
return false;
@@ -97,6 +98,7 @@ public class IdMap {
/*
* @see Object#hashCode()
*/
+ @Override
public int hashCode() {
return fName.hashCode() ^ fMappings.hashCode();
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java
index 4bf6f5b8d..f9f742c7d 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java
@@ -36,6 +36,7 @@ public class Mapping {
/*
* @see Object#equals(Object)
*/
+ @Override
public boolean equals(Object object) {
if (!(object instanceof Mapping))
return false;
@@ -54,6 +55,7 @@ public class Mapping {
/*
* @see Object#hashCode()
*/
+ @Override
public int hashCode() {
return fElement.hashCode() ^ fSignature.hashCode();
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java
index f8ca5a34b..3474f9887 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java
@@ -113,6 +113,7 @@ public class OrderedMatching extends AbstractMatching {
}
/* matches two trees according to paper "X-Diff", p. 16 */
+ @Override
public void match(
XMLNode LeftTree,
XMLNode RightTree,
@@ -210,6 +211,7 @@ public class OrderedMatching extends AbstractMatching {
return distance;
}
+ @Override
protected int handleXandYnotLeaves(XMLNode x, XMLNode y) {
/* handle entries as ordered*/
return orderedMath(x, y);
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java
index a58623343..002b95a60 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java
@@ -24,6 +24,7 @@ class SelectMatcherAction extends Action {
setToolTipText(fDesc);
}
+ @Override
public void run() {
((XMLStructureCreator) fViewer.getStructureCreator()).setIdMap(fDesc);
fViewer.contentChanged();
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
index 60f8645e6..27abce99e 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
@@ -61,6 +61,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
* @param ancestor the parent composite to contain the dialog area
* @return the dialog area control
*/
+ @Override
protected Control createDialogArea(Composite ancestor) {
Composite composite= (Composite) super.createDialogArea(ancestor);
@@ -80,6 +81,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
fIdMapText.setLayoutData(data);
fIdMapText.setText(fIdMap.getName());
fIdMapText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -95,6 +97,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
fIdMapExtText.setLayoutData(data);
fIdMapExtText.setText(fIdMap.getExtension());
fIdMapExtText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -133,6 +136,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
/**
* Notifies that the ok button of this dialog has been pressed.
*/
+ @Override
protected void okPressed() {
fIdMap.setName(fIdMapText.getText());
fIdMap.setExtension(fIdMapExtText.getText().toLowerCase());
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
index cd0881ba3..bc85b1ffc 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java
@@ -58,6 +58,7 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
* @param ancestor the parent composite to contain the dialog area
* @return the dialog area control
*/
+ @Override
protected Control createDialogArea(Composite ancestor) {
Composite composite= (Composite) super.createDialogArea(ancestor);
@@ -81,6 +82,7 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
fIdMapText= new Text(inner, SWT.BORDER);
fIdMapText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fIdMapText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -109,6 +111,7 @@ public class XMLCompareEditCopyIdMapDialog extends StatusDialog {
/**
* Notifies that the ok button of this dialog has been pressed.
*/
+ @Override
protected void okPressed() {
fResult= fIdMapText.getText();
super.okPressed();
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
index 7b3d24c2e..c1bcc67b5 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java
@@ -66,6 +66,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
* @param ancestor the parent composite to contain the dialog area
* @return the dialog area control
*/
+ @Override
protected Control createDialogArea(Composite ancestor) {
Composite composite= (Composite) super.createDialogArea(ancestor);
@@ -84,6 +85,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
fElementText.setText(fMapping.getElement());
fElementText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fElementText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -100,6 +102,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
data.widthHint= convertWidthInCharsToPixels(50);
fSignatureText.setLayoutData(data);
fSignatureText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -114,6 +117,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
fIdAttributeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fIdAttributeText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -165,6 +169,7 @@ public class XMLCompareEditMappingDialog extends StatusDialog {
/**
* Notifies that the ok button of this dialog has been pressed.
*/
+ @Override
protected void okPressed() {
fMapping.setElement(fElementText.getText());
fMapping.setSignature(fSignatureText.getText());
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
index c519224d6..a22f69c8c 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java
@@ -66,6 +66,7 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
* @param ancestor the parent composite to contain the dialog area
* @return the dialog area control
*/
+ @Override
protected Control createDialogArea(Composite ancestor) {
Composite composite= (Composite) super.createDialogArea(ancestor);
@@ -84,6 +85,7 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
fElementText.setText(fMapping.getElement());
fElementText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fElementText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -100,6 +102,7 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
data.widthHint= convertWidthInCharsToPixels(50);
fSignatureText.setLayoutData(data);
fSignatureText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e){
doValidation();
}
@@ -141,6 +144,7 @@ public class XMLCompareEditOrderedDialog extends StatusDialog {
/**
* Notifies that the ok button of this dialog has been pressed.
*/
+ @Override
protected void okPressed() {
fMapping.setElement(fElementText.getText());
fMapping.setSignature(fSignatureText.getText());
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
index 4319fa8ca..b978df3b1 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java
@@ -100,6 +100,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
/**
* @see PreferencePage#createContents(Composite)
*/
+ @Override
protected Control createContents(Composite ancestor) {
Composite parent= new Composite(ancestor, SWT.NULL);
GridLayout layout= new GridLayout();
@@ -122,6 +123,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
data.heightHint = fIdMapsTable.getItemHeight()*4;
fIdMapsTable.setLayoutData(data);
fIdMapsTable.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
selectionChanged();
}
@@ -156,6 +158,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fAddIdMapButton = new Button(buttons, SWT.PUSH);
fAddIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topAdd);
fAddIdMapButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
addIdMap(fAddIdMapButton.getShell());
}
@@ -170,6 +173,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRenameIdMapButton = new Button(buttons, SWT.PUSH);
fRenameIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topRename);
fRenameIdMapButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
renameIdMap(fRenameIdMapButton.getShell());
}
@@ -184,6 +188,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRemoveIdMapButton = new Button(buttons, SWT.PUSH);
fRemoveIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topRemove);
fRemoveIdMapButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
removeIdMap(fRemoveIdMapButton.getShell());
}
@@ -200,6 +205,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fEditIdMapButton = new Button(buttons, SWT.PUSH);
fEditIdMapButton.setText(XMLCompareMessages.XMLComparePreference_topEdit);
fEditIdMapButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
editIdMap(fEditIdMapButton.getShell());
}
@@ -264,6 +270,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fNewMappingsButton.setLayoutData(getButtonGridData(fNewMappingsButton));
fNewMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleNew);
fNewMappingsButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
addMapping(fAddIdMapButton.getShell());
}
@@ -273,6 +280,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fEditMappingsButton.setLayoutData(getButtonGridData(fEditMappingsButton));
fEditMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleEdit);
fEditMappingsButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
editMapping(fEditMappingsButton.getShell());
}
@@ -282,6 +290,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRemoveMappingsButton.setLayoutData(getButtonGridData(fRemoveMappingsButton));
fRemoveMappingsButton.setText(XMLCompareMessages.XMLComparePreference_middleRemove);
fRemoveMappingsButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
removeMapping(fRemoveMappingsButton.getShell());
}
@@ -327,6 +336,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fNewOrderedButton.setLayoutData(getButtonGridData(fNewOrderedButton));
fNewOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomNew);
fNewOrderedButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
addOrdered(fNewOrderedButton.getShell());
}
@@ -336,6 +346,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fEditOrderedButton.setLayoutData(getButtonGridData(fEditOrderedButton));
fEditOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomEdit);
fEditOrderedButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
editOrdered(fEditOrderedButton.getShell());
}
@@ -345,6 +356,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
fRemoveOrderedButton.setLayoutData(getButtonGridData(fRemoveOrderedButton));
fRemoveOrderedButton.setText(XMLCompareMessages.XMLComparePreference_bottomRemove);
fRemoveOrderedButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
removeOrdered(fRemoveOrderedButton.getShell());
}
@@ -377,10 +389,12 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
return data;
}
+ @Override
public void init(IWorkbench workbench) {
noDefaultAndApplyButton();
}
+ @Override
public void handleEvent(Event event) {
// empty implementation
}
@@ -758,6 +772,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
/*
* @see IWorkbenchPreferencePage#performDefaults
*/
+ @Override
public boolean performOk() {
XMLPlugin plugin= XMLPlugin.getDefault();
if (!plugin.getIdMaps().equals(fIdMaps)
@@ -768,6 +783,7 @@ public class XMLComparePreferencePage extends PreferencePage implements IWorkben
return super.performOk();
}
+ @Override
public boolean performCancel() {
fIdMaps = (HashMap) XMLPlugin.getDefault().getIdMaps().clone();
return super.performCancel();
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java
index 8adba4b36..c79c87ef1 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java
@@ -56,6 +56,7 @@ public class XMLNode extends DocumentRangeNode implements ITypedElement {
/*
* @see ITypedElement#getName
*/
+ @Override
public String getName() {
if (fName != null)
return fName;
@@ -70,6 +71,7 @@ public class XMLNode extends DocumentRangeNode implements ITypedElement {
* Every xml node is of type "txt" so that the builtin TextMergeViewer is used automatically.
* @see ITypedElement#getType
*/
+ @Override
public String getType() {
return "txt"; //$NON-NLS-1$
}
@@ -81,6 +83,7 @@ public class XMLNode extends DocumentRangeNode implements ITypedElement {
/*
* @see ITypedElement#getImage
*/
+ @Override
public Image getImage() {
if (fOrderedChild)
return CompareUI.getImage(XMLPlugin.IMAGE_TYPE_PREFIX + XMLStructureCreator.TYPE_ELEMENT + XMLPlugin.IMAGE_TYPE_ORDERED_SUFFIX);
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
index e09152bdf..23f8e93c5 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
@@ -92,6 +92,7 @@ public final class XMLPlugin extends AbstractUIPlugin {
fgXMLPlugin= this;
}
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -355,6 +356,7 @@ public final class XMLPlugin extends AbstractUIPlugin {
if (window == null) {
final WindowRef windowRef= new WindowRef();
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
setActiveWorkbenchWindow(windowRef);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
index 604ad8410..3f8141a76 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
@@ -101,14 +101,16 @@ public class XMLStructureCreator implements IStructureCreator {
protected Locator prevlocator; //previous locator
protected Locator locator; //current locator
- public void setDocumentLocator(Locator locator0) {
+ @Override
+ public void setDocumentLocator(Locator locator0) {
this.locator= locator0;
}
// DocumentHandler methods
/* Processing instruction. */
- public void processingInstruction(String target, String data) {
+ @Override
+ public void processingInstruction(String target, String data) {
// System.out.println("target: " + target);
// System.out.println("data: " + data);
@@ -124,12 +126,14 @@ public class XMLStructureCreator implements IStructureCreator {
}
/** Start document. */
- public void startDocument() {
+ @Override
+ public void startDocument() {
prevlocator= new LocatorImpl(locator);
}
/* Start element. */
- public void startElement(String uri, String local, String raw, Attributes attrs) {
+ @Override
+ public void startElement(String uri, String local, String raw, Attributes attrs) {
XMLNode currentElement;
/* add root node for this element */
@@ -310,7 +314,8 @@ public class XMLStructureCreator implements IStructureCreator {
}
/* Characters. */
- public void characters(char ch[], int start, int length) {
+ @Override
+ public void characters(char ch[], int start, int length) {
if (!ignoreBodies) {
// String chars = (new String(ch, start, length)).trim();
String chars= new String(ch, start, length);
@@ -369,7 +374,8 @@ public class XMLStructureCreator implements IStructureCreator {
}
/* Ignorable whitespace. */
- public void ignorableWhitespace(char ch[], int start, int length) {
+ @Override
+ public void ignorableWhitespace(char ch[], int start, int length) {
//
//// characters(ch, start, length);
//// System.out.flush();
@@ -378,7 +384,8 @@ public class XMLStructureCreator implements IStructureCreator {
}
/* End element. */
- public void endElement(String uri, String local, String raw) {
+ @Override
+ public void endElement(String uri, String local, String raw) {
if (XMLStructureCreator.DEBUG_MODE)
System.out.println("\nExiting element " + fcurrentParent.getId()); //$NON-NLS-1$
@@ -453,21 +460,24 @@ public class XMLStructureCreator implements IStructureCreator {
//
/* Warning. */
- public void warning(SAXParseException ex) {
+ @Override
+ public void warning(SAXParseException ex) {
System.err.println("[Warning] " + //$NON-NLS-1$
getLocationString(ex) + ": " + //$NON-NLS-1$
ex.getMessage());
}
/* Error. */
- public void error(SAXParseException ex) {
+ @Override
+ public void error(SAXParseException ex) {
System.err.println("[Error] " + //$NON-NLS-1$
getLocationString(ex) + ": " + //$NON-NLS-1$
ex.getMessage());
}
/* Fatal error. */
- public void fatalError(SAXParseException ex) throws SAXException {
+ @Override
+ public void fatalError(SAXParseException ex) throws SAXException {
System.err.println("[Fatal Error] " + //$NON-NLS-1$
getLocationString(ex) + ": " + //$NON-NLS-1$
ex.getMessage());
@@ -515,7 +525,8 @@ public class XMLStructureCreator implements IStructureCreator {
/*
* This title will be shown in the title bar of the structure compare pane.
*/
- public String getName() {
+ @Override
+ public String getName() {
return DEFAULT_NAME;
}
@@ -557,7 +568,8 @@ public class XMLStructureCreator implements IStructureCreator {
/*
* Returns the XML parse tree of the input.
*/
- public IStructureComparator getStructure(Object input) {
+ @Override
+ public IStructureComparator getStructure(Object input) {
if (XMLStructureCreator.DEBUG_MODE)
System.out.println("Starting parse"); //$NON-NLS-1$
@@ -632,7 +644,8 @@ public class XMLStructureCreator implements IStructureCreator {
// nothing to do
}
- public void save(IStructureComparator structure, Object input) {
+ @Override
+ public void save(IStructureComparator structure, Object input) {
if (input instanceof IEditableContent && structure instanceof XMLNode) {
IDocument document= ((XMLNode) structure).getDocument();
IEditableContent bca= (IEditableContent) input;
@@ -655,7 +668,8 @@ public class XMLStructureCreator implements IStructureCreator {
}
}
- public String getContents(Object node, boolean ignoreWhitespace) {
+ @Override
+ public String getContents(Object node, boolean ignoreWhitespace) {
if (node instanceof XMLNode) {
String s= ((XMLNode) node).getValue();
if (ignoreWhitespace)
@@ -665,7 +679,8 @@ public class XMLStructureCreator implements IStructureCreator {
return null;
}
- public IStructureComparator locate(Object path, Object source) {
+ @Override
+ public IStructureComparator locate(Object path, Object source) {
return null;
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
index cb8757304..8ea560cc2 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
@@ -64,6 +64,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
fAlwaysOrderSort= alwaysOrderSort;
}
+ @Override
public int category(Object node) {
if (node instanceof DiffNode) {
Object o= ((DiffNode) node).getId();
@@ -80,6 +81,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
return 0;
}
+ @Override
public void sort(final Viewer viewer, Object[] elements) {
if ((fOrdered != null || fAlwaysOrderSort)
&& elements != null
@@ -100,6 +102,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
new ArrayList(
Arrays.asList(parent.getChildren()));
Arrays.sort(elements, new Comparator() {
+ @Override
public int compare(Object a, Object b) {
return XMLSorter.this.compare(
(DiffNode) a,
@@ -175,6 +178,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
/* (non Javadoc)
* Overridden to unregister all listeners.
*/
+ @Override
protected void handleDispose(DisposeEvent event) {
XMLPlugin.getDefault().getViewers().remove(this);
@@ -185,6 +189,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
/*
* Recreates the comparable structures for the input sides.
*/
+ @Override
protected void compareInputChanged(ICompareInput input) {
if (input != null) {
ITypedElement t= input.getLeft();
@@ -222,6 +227,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
}
+ @Override
protected void preDiffHook(
IStructureComparator ancestor,
IStructureComparator left,
@@ -239,6 +245,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
*
* @param toolBarManager the toolbar manager for which to add the buttons
*/
+ @Override
protected void createToolItems(ToolBarManager toolBarManager) {
super.createToolItems(toolBarManager);
toolBarManager.appendToGroup("modes", new ChooseMatcherDropDownAction(this)); //$NON-NLS-1$
@@ -251,6 +258,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
*
* @param manager the menu manager for which to add menu items
*/
+ @Override
protected void fillContextMenu(IMenuManager manager) {
super.fillContextMenu(manager);
ISelection s= getSelection();
@@ -393,6 +401,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
fDiffNode= diffnode;
}
+ @Override
public void run() {
XMLStructureCreator sc= getXMLStructureCreator();
// DiffNode diffnode = (DiffNode) ((StructuredSelection) getSelection()).getFirstElement();
@@ -465,6 +474,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
fIdMapName= idmap_name;
}
+ @Override
public void run() {
//String idmap_name= getXMLStructureCreator().getIdMap();
if (fSignature != null) {
@@ -492,6 +502,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
* Clients may override to track their own property changes.
* In this case they must call the inherited method.
*/
+ @Override
protected void propertyChange(PropertyChangeEvent event) {
String key= event.getProperty();
if (key.equals(CompareConfiguration.IGNORE_WHITESPACE)) {
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java
index cd13d4792..37efadb65 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java
@@ -25,6 +25,7 @@ import org.eclipse.compare.IViewerCreator;
*/
public class XMLStructureViewerCreator implements IViewerCreator {
+ @Override
public Viewer createViewer(Composite parent, CompareConfiguration mp) {
return new XMLStructureViewer(parent, mp);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java
index 506501781..50ad9faa8 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java
@@ -115,6 +115,7 @@ public class MessageLine extends CLabel {
if (fErrorColor == null) {
fErrorColor= new Color(getDisplay(), fErrorRGB);
addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
fErrorColor.dispose();
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java
index 455dad1e6..2089fc52b 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java
@@ -88,6 +88,7 @@ public abstract class StatusDialog extends Dialog {
/*
* @see Window#create(Shell)
*/
+ @Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
if (fTitle != null)
@@ -97,6 +98,7 @@ public abstract class StatusDialog extends Dialog {
/*
* @see Window#create()
*/
+ @Override
public void create() {
super.create();
if (fLastStatus != null) {
@@ -113,6 +115,7 @@ public abstract class StatusDialog extends Dialog {
/*
* @see Dialog#createButtonsForButtonBar(Composite)
*/
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
fOkButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
@@ -121,6 +124,7 @@ public abstract class StatusDialog extends Dialog {
/*
* @see Dialog#createButtonBar(Composite)
*/
+ @Override
protected Control createButtonBar(Composite parent) {
Composite composite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout();
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java
index f951759a5..1729e244d 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java
@@ -44,6 +44,7 @@ public class StatusInfo implements IStatus {
/*
* Returns if the status' severity is OK.
*/
+ @Override
public boolean isOK() {
return fSeverity == IStatus.OK;
}
@@ -72,6 +73,7 @@ public class StatusInfo implements IStatus {
/*
* @see IStatus#getMessage
*/
+ @Override
public String getMessage() {
return fStatusMessage;
}
@@ -117,6 +119,7 @@ public class StatusInfo implements IStatus {
/*
* @see IStatus#matches(int)
*/
+ @Override
public boolean matches(int severityMask) {
return (fSeverity & severityMask) != 0;
}
@@ -125,6 +128,7 @@ public class StatusInfo implements IStatus {
* Returns always <code>false</code>.
* @see IStatus#isMultiStatus()
*/
+ @Override
public boolean isMultiStatus() {
return false;
}
@@ -132,6 +136,7 @@ public class StatusInfo implements IStatus {
/*
* @see IStatus#getSeverity()
*/
+ @Override
public int getSeverity() {
return fSeverity;
}
@@ -139,6 +144,7 @@ public class StatusInfo implements IStatus {
/*
* @see IStatus#getPlugin()
*/
+ @Override
public String getPlugin() {
return "XMLPlugIn"; //$NON-NLS-1$
}
@@ -147,6 +153,7 @@ public class StatusInfo implements IStatus {
* Returns always <code>null</code>.
* @see IStatus#getException()
*/
+ @Override
public Throwable getException() {
return null;
}
@@ -155,6 +162,7 @@ public class StatusInfo implements IStatus {
* Returns always the error severity.
* @see IStatus#getCode()
*/
+ @Override
public int getCode() {
return fSeverity;
}
@@ -163,6 +171,7 @@ public class StatusInfo implements IStatus {
* Returns always <code>null</code>.
* @see IStatus#getChildren()
*/
+ @Override
public IStatus[] getChildren() {
return new IStatus[0];
}
diff --git a/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java
index f3e0ed9b8..0e7ad3ea5 100644
--- a/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java
+++ b/examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java
@@ -35,6 +35,7 @@ public class TestXMLStructureCreator extends TestCase {
fString= string;
}
+ @Override
public InputStream getContents() throws CoreException {
try {
return new ByteArrayInputStream(fString.getBytes("UTF-16")); //$NON-NLS-1$
@@ -43,6 +44,7 @@ public class TestXMLStructureCreator extends TestCase {
}
}
+ @Override
public String getCharset() {
return "UTF-16"; //$NON-NLS-1$
}
@@ -52,12 +54,14 @@ public class TestXMLStructureCreator extends TestCase {
super(name);
}
+ @Override
protected void setUp() {
System.out.println("TestXMLStructureCreator.name()==" + getName()); //$NON-NLS-1$
fdoc = new Document();
fsc = new XMLStructureCreator();
}
+ @Override
protected void tearDown() throws Exception {
//remove set-up
}

Back to the top