aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2014-07-15 11:48:09 (EDT)
committerDavid Williams2014-07-24 12:16:07 (EDT)
commit22aff5ea255a038348dd75694e262812abf76586 (patch)
treed894a25c3ca0e434099823b2f3da2fcc715de363
parenteaf40b8ef498cef40de2100d4ba5da2946b15347 (diff)
downloadeclipse.platform.releng-22aff5ea255a038348dd75694e262812abf76586.zip
eclipse.platform.releng-22aff5ea255a038348dd75694e262812abf76586.tar.gz
eclipse.platform.releng-22aff5ea255a038348dd75694e262812abf76586.tar.bz2
bug 276257 - Fixed bugs that broke xml filesrefs/changes/21/29921/4
. Fixed Breackage on XML files with xml header - fixed insertion offset bug. . Style fix. Copyright commment is now inserted on a new line, not on the same line as xml header (if header is present). . Fixed Breackage on XML files with existing copyright notice where copyright comment is on the first line with an xml header. e.g: <?xml ... ?> <--- . Fixed Incorrect 'comment not on first line' warning for xml files. - XML copyright comments can start on non-first line as XML files can have meta head(ers). . Removed'BUGS_FIXED' variable from xml_file and it's references. . Added some comments here and there. Change-Id: I3c19bb4579dec28bfe3cb96d7cd8efd71f6ea352 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
-rw-r--r--bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedCopyrightComment.java5
-rw-r--r--bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedFixCopyrightAction.java31
-rw-r--r--bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/SourceFile.java34
-rw-r--r--bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/XmlFile.java189
-rw-r--r--bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/preferences/CopyrightPreferencePage.java60
5 files changed, 245 insertions, 74 deletions
diff --git a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedCopyrightComment.java b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedCopyrightComment.java
index 6015573..2528e46 100644
--- a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedCopyrightComment.java
+++ b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedCopyrightComment.java
@@ -128,8 +128,9 @@ public class AdvancedCopyrightComment extends CopyrightComment {
// if this is the line, containing the ${date}, add in the year
if (offset > -1) {
writer.print(linePrefix + ' ' + currentLine.substring(0, offset) + getCreationYear());
- if (hasRevisionYear() && getRevisionYear() != getCreationYear())
- writer.print(", " + getRevisionYear()); //$NON-NLS-1$
+ if (hasRevisionYear() && getRevisionYear() != getCreationYear()) {
+ writer.print(", " + getRevisionYear()); //$NON-NLS-1$
+ }
println(writer, currentLine.substring(offset+DATE_VAR.length(), currentLine.length()));
} else {
// just write out the line
diff --git a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedFixCopyrightAction.java b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedFixCopyrightAction.java
index 5e20498..22036bf 100644
--- a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedFixCopyrightAction.java
+++ b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/AdvancedFixCopyrightAction.java
@@ -294,6 +294,19 @@ public class AdvancedFixCopyrightAction implements IObjectActionDelegate {
}
}
+ /**
+ * Handle an induvidual file at a time
+ *
+ * <p>Functions:
+ * <ul>
+ * - <li> get user defined default date </li>
+ * - <li> identify if multiple comments inserted. </li>
+ * <li> update existing comment or insert a new one </li>
+ * </ul>
+ * @param file - file to be proccessed (.java, .bat, .xml etc...)
+ * @param adapter
+ * @param monitor
+ */
private void processFile(IFile file, RepositoryProviderCopyrightAdapter adapter, IProgressMonitor monitor) {
monitor.subTask(file.getFullPath().toOSString());
@@ -318,7 +331,9 @@ public class AdvancedFixCopyrightAction implements IObjectActionDelegate {
return;
}
+ //extract 'current' comment from the document.
BlockComment copyrightComment = aSourceFile.getFirstCopyrightComment();
+
CopyrightComment ibmCopyright = null;
// if replacing all comments, don't even parse, just use default copyright comment
if (prefStore.getBoolean(RelEngCopyrightConstants.REPLACE_ALL_EXISTING_KEY)) {
@@ -343,7 +358,9 @@ public class AdvancedFixCopyrightAction implements IObjectActionDelegate {
// figure out revision year
int revised = ibmCopyright.getRevisionYear();
- int lastMod = revised;
+ int lastMod = revised;
+
+ //Read user defined year from options.
if (prefStore.getBoolean(RelEngCopyrightConstants.USE_DEFAULT_REVISION_YEAR_KEY) || adapter == null)
lastMod = prefStore.getInt(RelEngCopyrightConstants.REVISION_YEAR_KEY);
else {
@@ -385,11 +402,17 @@ public class AdvancedFixCopyrightAction implements IObjectActionDelegate {
// either replace old copyright or put the new one at the top of the file
ibmCopyright.setRevisionYear(lastMod);
- if (copyrightComment == null)
+ if (copyrightComment == null) //do this on files without comments
aSourceFile.insert(ibmCopyright.getCopyrightComment());
- else {
- if (!copyrightComment.atTop())
+ else { //do this with files that have a copy-right comment already.
+
+ //Verify that the comment is at the top of the file. Warn otherwise.
+ if (!copyrightComment.atTop() &&
+ //[276257] XML file is a special case because it can have an xml-header and other headers, thus it can start at an arbirary position.
+ (aSourceFile.getFileType() != CopyrightComment.XML_COMMENT)) {
+
warn(file, copyrightComment, Messages.getString("AdvancedFixCopyrightAction.19")); //$NON-NLS-1$
+ }
aSourceFile.replace(copyrightComment, ibmCopyright.getCopyrightComment());
}
}
diff --git a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/SourceFile.java b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/SourceFile.java
index 035bad6..66f194a 100644
--- a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/SourceFile.java
+++ b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/SourceFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [235572] detect existing comments in bat files
+ * Leo Ufimtsev lufimtse@redhat.com [276257] fix xml issues.
*******************************************************************************/
package org.eclipse.releng.tools;
@@ -20,21 +21,17 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.core.resources.IFile;
-
import org.eclipse.core.filebuffers.FileBuffers;
import org.eclipse.core.filebuffers.ITextFileBuffer;
import org.eclipse.core.filebuffers.ITextFileBufferManager;
import org.eclipse.core.filebuffers.LocationKind;
-
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.osgi.util.NLS;
/**
@@ -65,8 +62,8 @@ public abstract class SourceFile {
} else if (extension.equals("js")) { //$NON-NLS-1$
return new JavaScriptFile(file);
} else if (extension.equals("xml")) { //$NON-NLS-1$
- if (XmlFile.BUGS_FIXED)
- return new XmlFile(file);
+ //[276257] re-enable xml support.
+ return new XmlFile(file);
}
}
return null;
@@ -133,6 +130,7 @@ public abstract class SourceFile {
boolean inComment = false;
String commentStartString = ""; //$NON-NLS-1$
+ //Loop over the document, extract the comment.
while (aLine != null) {
contentsWriter.write(aLine);
contentsWriter.newLine();
@@ -199,16 +197,18 @@ public abstract class SourceFile {
}
/**
- * @param string
+ * Given the copyright comment, this method inserts it into the right place in the file.
+ *
+ * @param copyRightComment the complete comment that will be inserted.
*/
- public void insert(String string) {
+ public void insert(String copyRightComment) {
ITextFileBuffer fileBuffer= getFileBuffer();
if (fileBuffer == null)
return;
try {
IDocument document= fileBuffer.getDocument();
- doInsert(string, document);
+ doInsert(copyRightComment, document);
fileBuffer.commit(null, false);
} catch (BadLocationException e) {
e.printStackTrace();
@@ -245,10 +245,10 @@ public abstract class SourceFile {
}
/**
- * @param firstCopyrightComment
- * @param string
+ * @param aCommet
+ * @param newCopyrightComment Comment to be inserted.
*/
- public void replace(BlockComment aComment, String string) {
+ public void replace(BlockComment aComment, String newCopyrightComment) {
try {
@@ -260,7 +260,7 @@ public abstract class SourceFile {
IRegion startLine= document.getLineInformation(aComment.start);
IRegion endLine= document.getLineInformation(aComment.end + 1);
- document.replace(startLine.getOffset(), endLine.getOffset() - startLine.getOffset(), string);
+ document.replace(startLine.getOffset(), endLine.getOffset() - startLine.getOffset(), newCopyrightComment);
fileBuffer.commit(null, false);
diff --git a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/XmlFile.java b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/XmlFile.java
index 4803712..d580c6f 100644
--- a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/XmlFile.java
+++ b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/XmlFile.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 Gunnar Wagenknecht and others.
+ * Copyright (c) 2008, 2014 Gunnar Wagenknecht and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,31 +7,93 @@
*
* Contributors:
* Gunnar Wagenknecht - initial API and implementation
+ * Leo Ufimtsev lufimtse@redhat.com - fixed xml header issues.
+ * https://bugs.eclipse.org/381147
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=276257 //used.
+ *
+ *
*******************************************************************************/
package org.eclipse.releng.tools;
import java.io.IOException;
import org.eclipse.core.resources.IFile;
-
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
+/*
+ * Test notes:
+ * [x] Empty Document
+ * [x] Empty Document with XML header
+ * [x] Document with content, no XML header.
+ * [x] Document with XML header and content on 2nd line
+ * [x] Document with XML header, copyright on first line with content on first line.
+ * [x] Document with XML header, content on the first line that doesn't close properly.
+ * Example:
+ * <?xml version="1.0" encoding="UTF-8"?><fragment><extension
+ * //Copy-right comment is executed correctly, '<fragment ..' is put onto new line.
+ *
+ * [x] Document with XML header, copyright on 2nd line, stuff.
+ * [x] test with non-IBM header.
+ * 2014.07.15 tested.
+ *
+ */
+
/**
- * XML File
+ * <h2> XML File handler. </h2>
+ *
+ * <p> This class deals with the special case of 'xml' files.</p>
+ *
+ * <p> * If an xml header exists for example: {@code <?xml version="1.0" encoding="UTF-8"?> } <br>
+ * then the copyright comment is inserted exactly at the end of it, on a new line, <br>
+ * moving any content down below the xml header. </p>
+ *
+ * <p> It does take into account multiple headers also. e.g:<br>
+ * {@code <?xml version="1.0" encoding="UTF-8"?>}<br>
+ {@code <?eclipse version="3.2"?> }<br>
+ In this case, the copy right comment is inserted below the last header. </p>
+
+ * <p> If no xml header exists, then the copyright comment is inserted at the top of the xml file.<p>
*/
public class XmlFile extends SourceFile {
-
- // See https://bugs.eclipse.org/381147
- public static final boolean BUGS_FIXED= false;
public XmlFile(IFile file) {
super(file);
}
+ /**
+ * Deals with the fact that XML files can start with a header and the copy <br>
+ * right comment can start at the end of the header. <br>
+ *
+ * <p> For example: {@code <?xml?> <!-- } </p>
+ *
+ * {@inheritDoc}
+ */
+ public boolean isCommentStart(String aLine) {
+ return aLine.trim().contains(getCommentStart());
+
+ //Note, above is a bit different from parent, contains/startswithd:
+ //Parent:
+ //return aLine.trim().STARTSWITH(getCommentStart());
+
+ }
+
+ /**
+ * Deals with the fact that XML files can end with a header and the copy <br>
+ * right comment can start at the end of the header. <br>
+ *
+ * <p> For exaple: {@code <?xml?> <!-- } </p>
+ *
+ * {@inheritDoc}
+ */
+ public boolean isCommentEnd(String aLine, String commentStartString) {
+ return aLine.trim().contains(getCommentEnd());
+ //Similarly, uses 'contains' instead of 'starts with'
+ }
+
public String getCommentStart() {
- return "<!--"; //$NON-NLS-1$
+ return "<!--"; //$NON-NLS-1$
}
public String getCommentEnd() {
@@ -42,17 +104,47 @@ public class XmlFile extends SourceFile {
return CopyrightComment.XML_COMMENT;
}
- /* (non-Javadoc)
+ /**
+ * Given the new constructed copyright comment, it inserts it into the the document.
+ *
+ * <p> Note, this is only called if inserting an actual comment.<br>
+ * If only updating the year, this method is not called. </p>
* @see org.eclipse.releng.tools.SourceFile#doInsert(java.lang.String, org.eclipse.jface.text.IDocument)
*/
- protected void doInsert(final String comment, IDocument document) throws BadLocationException, IOException {
- // find insert offset (we must skip instructions)
- int insertOffset = findInsertOffset(document);
-
- // insert comment
- document.replace(insertOffset, 0, comment);
- }
+ protected void doInsert(final String comment, IDocument document) throws BadLocationException, IOException {
+
+ //----------------- XML COMMENT CLEAN UP
+ // XML comments need extra-tidy up because we need to consider the existance of an XML header
+ String tidyComment = comment.trim();
+
+ //Append new-line at the end for cleaner look.
+ tidyComment += "\n";
+ // check for existance of an xml header (<?xml)
+ // If so, put the comment 'below' it.
+ // example:
+ //<?xml .... ?>
+ //<--
+ // comment start....
+ if (containsXmlEncoding(document)) {
+ // If encoding is present, pre-append a new line.
+ tidyComment = "\n" + tidyComment; //$NON-NLS-1$
+ }
+
+ //------------------ COMMENT INSERT
+ // find insert offset (we must skip instructions)
+ int insertOffset = findInsertOffset(document);
+
+ // insert comment
+ document.replace(insertOffset, 0, tidyComment);
+ }
+
+ /**
+ * Given the document, find the place after the xml header to insert the comment.
+ * @param document
+ * @return
+ * @throws BadLocationException
+ */
private int findInsertOffset(IDocument document) throws BadLocationException {
boolean inInstruction = false;
int insertOffset = 0;
@@ -62,8 +154,8 @@ public class XmlFile extends SourceFile {
// ignore whitespace and new lines
if(Character.isWhitespace(c)) {
- // we update the offset to ignore whitespaces
- // after instruction ends
+ // we update the offset to ignore whitespaces
+ // after instruction ends
insertOffset = offset;
continue;
}
@@ -74,7 +166,9 @@ public class XmlFile extends SourceFile {
// look for instruction ending
if(inInstruction) {
if(c == '?' && c2 == '>') {
- insertOffset = offset + 1;
+
+ //Offset is '+2' not '+1' because of '?' in '?>'
+ insertOffset = offset + 2;
inInstruction = false;
offset++; // don't need to analyse c2 again
// we continue in case there are more instructions
@@ -97,4 +191,63 @@ public class XmlFile extends SourceFile {
}
return insertOffset;
}
+
+ /**
+ * Find out if an XML document contains an XML meta header.
+ *
+ * <p> XML documents <b> sometimes </b> contain a header specifying various attributes such as <br>
+ * version, encoding etc... </p>
+ *
+ * <p> Examples include: <br>
+ * {@literal <?xml version="1.0" encoding="UTF-8"?> }<br>
+ * {@literal<?xml version="1.0" encoding="UTF-8" standalone="no"?> } <br>
+ * {@literal <?xml version="1.0" ?> } </p>
+ *
+ * @param xmlDoc
+ * @return True if it contains a header.
+ * @throws BadLocationException
+ */
+ public boolean containsXmlEncoding(IDocument xmlDoc) throws BadLocationException {
+
+ //XML attribute headers *must* reside on the first line.
+ //We identify if the xml document contains a header by checking the first tag and see if it starts with: <?xml
+
+ //-- Check to see if the document is long enough to contain the minimum '<?xml?>' tag
+ if (xmlDoc.getLength() < 7) {
+ return false;
+ }
+
+ for (int offset = 0; offset < xmlDoc.getLength(); offset++) {
+
+ //Read Char.
+ char c = xmlDoc.getChar(offset);
+
+ // ignore whitespace and new lines
+ if(Character.isWhitespace(c)) {
+ continue;
+ }
+
+ //Once we've found the first '<', check that it's a '<?xml'
+ if (c == '<') {
+
+ //check that document is long enough to close a header if we are to read it: '<?xml
+ if ((offset + 4) < xmlDoc.getLength()) {
+
+ //Read "<?xml" equivalent.
+ String xmlTag = "" + c + xmlDoc.getChar(offset+1) + xmlDoc.getChar(offset+2) + //$NON-NLS-1$
+ xmlDoc.getChar(offset+3) + xmlDoc.getChar(offset+4);
+
+ if ( xmlTag.compareToIgnoreCase("<?xml") == 0) { //$NON-NLS-1$
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+ }
+
+ //if parsing an empty xml document, return false.
+ return false;
+ }
+
}
diff --git a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/preferences/CopyrightPreferencePage.java b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/preferences/CopyrightPreferencePage.java
index 9c0fa4e..9556277 100644
--- a/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/preferences/CopyrightPreferencePage.java
+++ b/bundles/org.eclipse.releng.tools/src/org/eclipse/releng/tools/preferences/CopyrightPreferencePage.java
@@ -10,12 +10,18 @@
*******************************************************************************/
package org.eclipse.releng.tools.preferences;
-import org.osgi.service.prefs.BackingStoreException;
-
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.releng.tools.Messages;
import org.eclipse.releng.tools.RelEngPlugin;
-import org.eclipse.releng.tools.XmlFile;
-
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
@@ -27,22 +33,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.osgi.service.prefs.BackingStoreException;
/**
* Copyright tools preference page
@@ -136,14 +129,14 @@ public class CopyrightPreferencePage extends PreferencePage implements IWorkbenc
data.horizontalSpan = 2;
fIgnoreProperties.setLayoutData(data);
- if (XmlFile.BUGS_FIXED) {
- // ignore xml files
- fIgnoreXml = new Button(fComposite, SWT.CHECK);
- fIgnoreXml.setText(Messages.getString("CopyrightPreferencePage.9")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalSpan = 2;
- fIgnoreXml.setLayoutData(data);
- }
+
+ //[276257] re-enabling xml files
+ fIgnoreXml = new Button(fComposite, SWT.CHECK);
+ fIgnoreXml.setText(Messages.getString("CopyrightPreferencePage.9")); //$NON-NLS-1$
+ data = new GridData();
+ data.horizontalSpan = 2;
+ fIgnoreXml.setLayoutData(data);
+
KeyListener listener1 = new KeyAdapter() {
/* (non-Javadoc)
@@ -261,10 +254,11 @@ public class CopyrightPreferencePage extends PreferencePage implements IWorkbenc
// disable fix up existing copyright till it works better
// handleReplaceAllEnabled(fReplaceAllExisting.getSelection(), store.getBoolean(RelEngCopyrightConstants.FIX_UP_EXISTING_KEY));
fIgnoreProperties.setSelection(store.getBoolean(RelEngCopyrightConstants.IGNORE_PROPERTIES_KEY));
- if (XmlFile.BUGS_FIXED)
- fIgnoreXml.setSelection(store.getBoolean(RelEngCopyrightConstants.IGNORE_XML_KEY));
+
+ //[276257] re-enabling xml files
+ fIgnoreXml.setSelection(store.getBoolean(RelEngCopyrightConstants.IGNORE_XML_KEY));
}
-
+
/**
* Validate the control values in this preference page
*/
@@ -335,8 +329,8 @@ public class CopyrightPreferencePage extends PreferencePage implements IWorkbenc
// handleReplaceAllEnabled(fReplaceAllExisting.getSelection(), getPreferenceStore().getDefaultBoolean(RelEngCopyrightConstants.FIX_UP_EXISTING_KEY));
fIgnoreProperties.setSelection(getPreferenceStore().getDefaultBoolean(RelEngCopyrightConstants.IGNORE_PROPERTIES_KEY));
- if (XmlFile.BUGS_FIXED)
- fIgnoreXml.setSelection(getPreferenceStore().getDefaultBoolean(RelEngCopyrightConstants.IGNORE_XML_KEY));
+ //[276257] re-enabling xml files
+ fIgnoreXml.setSelection(getPreferenceStore().getDefaultBoolean(RelEngCopyrightConstants.IGNORE_XML_KEY));
super.performDefaults();
}
@@ -356,8 +350,8 @@ public class CopyrightPreferencePage extends PreferencePage implements IWorkbenc
// store.setValue(RelEngCopyrightConstants.FIX_UP_EXISTING_KEY, fFixExisting.getSelection());
store.setValue(RelEngCopyrightConstants.IGNORE_PROPERTIES_KEY, fIgnoreProperties.getSelection());
- if (XmlFile.BUGS_FIXED)
- store.setValue(RelEngCopyrightConstants.IGNORE_XML_KEY, fIgnoreXml.getSelection());
+ //[276257] re-enabling xml files
+ store.setValue(RelEngCopyrightConstants.IGNORE_XML_KEY, fIgnoreXml.getSelection());
try {
InstanceScope.INSTANCE.getNode(RelEngPlugin.ID).flush();