diff options
author | Nitin Dahyabhai | 2014-07-17 04:17:12 +0000 |
---|---|---|
committer | Nitin Dahyabhai | 2014-07-17 04:17:12 +0000 |
commit | edffaf8bd6500fa717dd49de86220dba8078bbc8 (patch) | |
tree | b8b94ce4a52690b5985be0cccac285f1037899d2 | |
parent | f26378e23b3475be280ec8678ebefab0610210bd (diff) | |
download | webtools.sourceediting-edffaf8bd6500fa717dd49de86220dba8078bbc8.tar.gz webtools.sourceediting-edffaf8bd6500fa717dd49de86220dba8078bbc8.tar.xz webtools.sourceediting-edffaf8bd6500fa717dd49de86220dba8078bbc8.zip |
[438209] Could not delete a new xml file added to existing project
3 files changed, 18 insertions, 10 deletions
diff --git a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF index 693ad0c26b..ae30918e25 100644 --- a/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.wst.xml.core; singleton:=true -Bundle-Version: 1.1.900.qualifier +Bundle-Version: 1.1.901.qualifier Bundle-Activator: org.eclipse.wst.xml.core.internal.XMLCorePlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/bundles/org.eclipse.wst.xml.core/pom.xml b/bundles/org.eclipse.wst.xml.core/pom.xml index e44a01fa5e..9ceab32746 100644 --- a/bundles/org.eclipse.wst.xml.core/pom.xml +++ b/bundles/org.eclipse.wst.xml.core/pom.xml @@ -16,12 +16,12 @@ <parent> <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.webtools.sourceediting</artifactId> - <version>3.6.0-SNAPSHOT</version> + <version>3.6.1-SNAPSHOT</version> <relativePath>../../</relativePath> </parent> <groupId>org.eclipse.webtools.sourceediting</groupId> <artifactId>org.eclipse.wst.xml.core</artifactId> - <version>1.1.900-SNAPSHOT</version> + <version>1.1.901-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java index 296d6a4290..c98070b45f 100644 --- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java +++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2013 IBM Corporation and others. + * Copyright (c) 2001, 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 @@ -14,8 +14,8 @@ package org.eclipse.wst.xml.core.internal.tasks; import java.io.BufferedReader; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -44,7 +44,7 @@ import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext; * A delegate to create IMarker.TASKs for "todos" and similar comments. */ public class XMLStreamingFileTaskScanner extends XMLLineTokenizer implements IFileTaskScanner, IExecutableExtension { - private static final boolean DEBUG_TASKSPERF = true; + private static final boolean DEBUG_TASKSPERF = false; // the list of attribute maps for the new tasks for the current file protected List fNewMarkerAttributeMaps = null; @@ -111,8 +111,10 @@ public class XMLStreamingFileTaskScanner extends XMLLineTokenizer implements IFi for (int i = 0; i < searchTags.length; i++) { searchTags[i] = taskTags[i].getTag().toLowerCase(Locale.ENGLISH); } + InputStream contents = null; try { - reset(new BufferedReader(new InputStreamReader(file.getContents(true), charset))); + contents = file.getContents(true); + reset(new BufferedReader(new InputStreamReader(contents, charset))); while (!isEOF()) { String regionType = primGetNextToken(); if (isCommentType(regionType)) { @@ -136,9 +138,6 @@ public class XMLStreamingFileTaskScanner extends XMLLineTokenizer implements IFi } } } - catch (UnsupportedEncodingException e) { - Logger.logException(e); - } catch (IOException e) { Logger.logException(e); } @@ -148,6 +147,15 @@ public class XMLStreamingFileTaskScanner extends XMLLineTokenizer implements IFi catch (BadLocationException e) { Logger.logException(e); } + finally { + if (contents != null) + try { + contents.close(); + } + catch (IOException e) { + // nothing to do + } + } monitor.done(); } |