diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml
deleted file mode 100644
index ae7471797c7..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.core.internal.filebuffers.FileBuffersPlugin; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; - -/** - * Facade for the file buffers plug-in. Provides access to the text file buffer manager and helper - * methods for location handling. This facade is available independent from the activation status of - * the file buffers plug-in. - * - *
This class must not be used by clients that do not want to require
- * org.eclipse.core.resources
. Use ITextFileBufferManager.DEFAULT
to get the
- * default text file buffer manager.
- *
- * @since 3.0
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public final class FileBuffers {
-
- /**
- * The workspace root.
- *
- * @since 3.3
- */
- private static final IWorkspaceRoot WORKSPACE_ROOT = ResourcesPlugin.getWorkspace().getRoot();
-
- /** Cannot be instantiated. */
- private FileBuffers() {}
-
- /**
- * File buffer plug-in ID (value "org.eclipse.core.filebuffers"
).
- *
- * @since 3.3.
- */
- public static final String PLUGIN_ID =
- "org.eclipse.core.filebuffers"; // FileBuffersPlugin.PLUGIN_ID;
-
- /**
- * Returns the text file buffer manager. May return null
if the file buffers plug-in
- * is not active. This is, for example, the case when the method is called on plug-in shutdown.
- *
- *
Use ITextFileBufferManager.DEFAULT
to get the default text file buffer manager
- * if you do not want to depend on org.eclipse.core.resources
.
- *
- * @return the text file buffer manager or null
- */
- public static ITextFileBufferManager getTextFileBufferManager() {
- FileBuffersPlugin plugin = FileBuffersPlugin.getDefault();
- return plugin != null ? plugin.getFileBufferManager() : null;
- }
-
- // /**
- // * Creates and returns an unshared text file buffer manager.
- // *
- // * @return the text file buffer manager or null
- // * @since 3.4
- // */
- // public static ITextFileBufferManager createTextFileBufferManager() {
- // Bundle resourcesBundle= Platform.getBundle("org.eclipse.core.resources"); //$NON-NLS-1$
- // if (resourcesBundle != null)
- // return new ResourceTextFileBufferManager();
- // return new TextFileBufferManager();
- // }
-
- /**
- * Returns the workspace file at the given location if such a file exists.
- *
- * @param location the location
- * @return the workspace file at the location or null
if no such file exists or if
- * the location is not a valid location
- */
- public static IFile getWorkspaceFileAtLocation(IPath location) {
- return getWorkspaceFileAtLocation(location, false);
- }
-
- /**
- * Returns the workspace file at the given location if such a file exists.
- *
- * @param location the location
- * @param isNormalized true
if the given location is already normalized
- * @return the workspace file at the location or null
if no such file exists or if
- * the location is not a valid location
- * @since 3.3
- */
- public static IFile getWorkspaceFileAtLocation(IPath location, boolean isNormalized) {
- IPath normalized;
- if (isNormalized) normalized = location;
- else normalized = normalizeLocation(location);
-
- if (normalized.segmentCount() >= 2) {
- // @see IContainer#getFile for the required number of segments
- IFile file = WORKSPACE_ROOT.getFile(normalized);
- if (file != null && file.exists()) return file;
- }
- return null;
- }
-
- /**
- * Returns the normalized form of the given path or location.
- *
- *
The normalized form is defined as follows: - * - *
pathOrLocation
- */
- public static IPath normalizeLocation(IPath pathOrLocation) {
- // existing workspace resources - this is the 93% case
- if (WORKSPACE_ROOT.exists(pathOrLocation)) return pathOrLocation.makeAbsolute();
-
- IFile file = WORKSPACE_ROOT.getFileForLocation(pathOrLocation);
- // existing workspace resources referenced by their file system path
- // files that do not exist (including non-accessible files) do not pass
- if (file != null && file.exists()) return file.getFullPath();
-
- // non-existing resources and external files
- return pathOrLocation.makeAbsolute();
- }
- //
- // /**
- // * Returns the file in the local file system for the given location.
- // * - // * The location is either a full path of a workspace resource or an - // * absolute path in the local file system. - // *
- // * - // * @param location the location - // * @return the {@link IFileStore} in the local file system for the given location - // * @since 3.2 - // */ - // public static IFileStore getFileStoreAtLocation(IPath location) { - // if (location == null) - // return null; - // - // IFile file= getWorkspaceFileAtLocation(location); - // try { - // if (file != null) { - // URI uri= file.getLocationURI(); - // if (uri == null) - // return null; - // return EFS.getStore(uri); - // } - // } catch (CoreException e) { - // //fall through and assume it is a local file - // } - // return EFS.getLocalFileSystem().getStore(location); - // } - - // /** - // * Returns the file in the local file system for the given location. - // *- // * The location is either a full path of a workspace resource or an - // * absolute path in the local file system. - // *
- // * - // * @param location the location - // * @return the {@link File} in the local file system for the given location - // * @deprecated As of 3.2, replaced by {@link #getFileStoreAtLocation(IPath)} - // */ - // public static File getSystemFileAtLocation(IPath location) { - // IFileStore store= getFileStoreAtLocation(location); - // if (store != null) { - // try { - // return store.toLocalFile(EFS.NONE, null); - // } catch (CoreException e) { - // return null; - // } - // } - // return null; - // } - -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IDocumentFactory.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IDocumentFactory.java deleted file mode 100644 index 3a9d388406b..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IDocumentFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2008 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 http://www.eclipse.org/legal/epl-v10.html - * - *Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.jface.text.IDocument; - -/** - * Factory for text file buffer documents. Used by the text file buffer manager to create the - * document for a new text file buffer. - * - *
This interface is the expected interface of extensions provided for the
- * "org.eclipse.core.filebuffers.documentCreation"
extension point.
- *
- * @since 3.0
- * @deprecated As of 3.2 the "org.eclipse.core.filebuffers.documentCreation"
extension
- * point has been deprecated. See the extension point documentation for more details.
- */
-public interface IDocumentFactory {
-
- /**
- * Creates and returns a new, empty document.
- *
- * @return a new, empty document
- */
- IDocument createDocument();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IDocumentSetupParticipant.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IDocumentSetupParticipant.java
deleted file mode 100644
index 7f482691660..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IDocumentSetupParticipant.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2008 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.jface.text.IDocument; - -/** - * Participates in the setup of a text file buffer document. - * - *
This interface is the expected interface for extensions provided for the
- * "org.eclipse.core.filebuffers.documentSetup"
extension point.
- *
- *
Participants have to be aware of the existence of other participants. I.e. they should always - * setup a document in a way that does not interfere with others. E.g., when a participant wants to - * install partitioning on the document, it must use the {@link - * org.eclipse.jface.text.IDocumentExtension3} API and choose a unique partitioning id. - * - *
In order to provide backward compatibility for clients of IDocumentSetupParticipant
- *
, extension interfaces are used to provide a means of evolution. The following extension
- * interfaces exist:
- *
- *
Contributors: Andrew Ferguson (Symbian) - Initial implementation - [api] enable document setup - * participants to customize behaviour based on resource being opened - - * https://bugs.eclipse.org/bugs/show_bug.cgi?id=208881 - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.core.runtime.IPath; -import org.eclipse.jface.text.IDocument; - -/** - * Extension interface for {@link org.eclipse.core.filebuffers.IDocumentSetupParticipant}. - * - *
This interface is additionally implemented by {@link IDocumentSetupParticipant}'s which would - * like to alter their behavior based on the location of the file being opened. - * - *
Note that when participants implement this interface, the original method from {@link - * IDocumentSetupParticipant} will never be called. - * - * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant - * @since 3.4 - */ -public interface IDocumentSetupParticipantExtension { - - /** - * Sets up the document to be ready for use by a text file buffer. - * - * @param document the document to be set up - * @param location a path of the resource backing the new document - * @param locationKind the kind of the given location - */ - void setup(IDocument document, IPath location, LocationKind locationKind); -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBuffer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBuffer.java deleted file mode 100644 index 20ca6d31bc0..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBuffer.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2011 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.content.IContentType; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.jface.text.IDocumentExtension4; - -/** - * A file buffer represents a file that can be edited by more than one client. Editing is session - * oriented. This means that editing is a sequence of modification steps. The start of the sequence - * and the end of the sequence are explicitly indicated. There are no time constraints connected - * with the sequence of modification steps. A file buffer reifies editing sessions and allows them - * to interleave. - * - *
It is not specified whether simultaneous editing sessions can be owned by different threads. - * - *
Clients are not supposed to implement that interface. Instances of this type are obtained from - * a {@link org.eclipse.core.filebuffers.IFileBufferManager}. - * - * @since 3.0 - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - */ -public interface IFileBuffer { - - /** - * Returns the location of this file buffer. - * - *
The location is either a full path of a workspace resource or an absolute path in the local - * file system. - * - *
Note: Since 3.3 this method can also return null
if the file
- * is not on the local file system.
- *
- * @return the location of this file buffer or null
if the file is not on the local
- * file system
- */
- IPath getLocation();
-
- // /**
- // * Returns the file store of this file buffer.
- // *
- // * @return the file store of this file buffer
- // * @since 3.3
- // */
- // IFileStore getFileStore();
-
- /**
- * Returns whether this file buffer is shared by more than one client.
- *
- * @return true
if this file buffer is shared by more than one client
- */
- boolean isShared();
-
- /**
- * Returns whether this file buffer is synchronized with the file system. This is when the file
- * buffer's underlying file is in synchronization with the file system and the file buffer has
- * been initialized after the underlying files has been modified the last time.
- *
- * @return true
if the file buffer is synchronized with the file system
- */
- boolean isSynchronized();
-
- /**
- * Returns the modification stamp of the file underlying this file buffer.
- *
- *
{@link IDocumentExtension4#UNKNOWN_MODIFICATION_STAMP} is returned if the buffer cannot get - * the modification stamp from the underlying file. - * - *
Note: The value of the modification stamp returned for non-existing files
- * can differ depending on the underlying file system.
- *
- * @return the modification stamp of the file underlying this file buffer
- */
- long getModificationStamp();
-
- /**
- * Returns whether this file buffer is commitable. This is the case when the file buffer's state
- * has been successfully validated.
- *
- * @return true
if the file buffer is commitable, false
otherwise
- * @since 3.1
- */
- boolean isCommitable();
-
- /**
- * Computes the scheduling rule that is required for committing a changed buffer.
- *
- * @return the commit scheduling rule or null
- * @since 3.1
- */
- ISchedulingRule computeCommitRule();
-
- /**
- * Commits this file buffer by changing the contents of the underlying file to the contents of
- * this file buffer. After that call, isDirty
returns false
and
- * isSynchronized
returns true
.
- *
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @param overwrite indicates whether the underlying file should be overwritten if it is not
- * synchronized with the file system
- * @throws CoreException if writing or accessing the underlying file fails
- */
- void commit(IProgressMonitor monitor, boolean overwrite) throws CoreException;
-
- /**
- * Reverts the contents of this file buffer to the content of its underlying file. After that call
- * successfully returned, isDirty
returns false
and isSynchronized
- *
returns true
.
- *
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @throws CoreException if reading or accessing the underlying file fails
- */
- void revert(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns whether changes have been applied to this file buffer since initialization, or the most
- * recent revert
or commit
call.
- *
- * @return true
if changes have been applied to this buffer
- */
- boolean isDirty();
-
- /**
- * Sets the dirty state of the file buffer to the given value. A direct subsequent call to
- * isDirty
returns the previously set value.
- *
- * @param isDirty true
if the buffer should be marked dirty, false
- * otherwise
- * @since 3.1
- */
- void setDirty(boolean isDirty);
-
- /**
- * Computes the scheduling rule that is required for validating the state of the buffer.
- *
- * @return the validate state scheduling rule or null
- * @since 3.1
- */
- ISchedulingRule computeValidateStateRule();
-
- /**
- * Validates the state of this file buffer and tries to bring the buffer's underlying file into a
- * state in which it can be modified. If state validation is not supported this operation does
- * nothing.
- *
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @param computationContext the context in which the validation is performed, e.g., a SWT shell
- * @exception CoreException if the underlying file can not be accessed or its state cannot be
- * changed
- */
- void validateState(IProgressMonitor monitor, Object computationContext) throws CoreException;
-
- /**
- * Returns whether the state of this file buffer has been validated. If state validation is not
- * supported this method always returns true
.
- *
- * @return true
if the state has been validated, false
otherwise
- */
- boolean isStateValidated();
-
- /**
- * Resets state validation. If state validation is supported, isStateValidated
- * afterwards returns false
until the state is revalidated.
- */
- void resetStateValidation();
-
- /**
- * Returns the status of this file buffer. This is the result of the last operation performed on
- * this file buffer or internally initiated by this file buffer.
- *
- * @return the status of this file buffer
- */
- IStatus getStatus();
-
- /**
- * The caller requests that the synchronization context is used to synchronize this file buffer
- * with its underlying file.
- *
- * @since 3.1
- */
- void requestSynchronizationContext();
-
- /**
- * The caller no longer requests the synchronization context for this file buffer.
- *
- * @since 3.1
- */
- void releaseSynchronizationContext();
-
- /**
- * Returns whether a synchronization context has been requested for this file buffer and not yet
- * released.
- *
- * @return true
if a synchronization context is requested, false
- * otherwise
- * @since 3.1
- */
- boolean isSynchronizationContextRequested();
-
- /**
- * Returns the content type of this file buffer or null
if none could be determined.
- * If the file buffer is dirty, the returned content type is determined by the buffer's dirty
- * state.
- *
- * @return the content type or null
- * @throws CoreException if reading or accessing the underlying file fails
- * @since 3.1
- */
- IContentType getContentType() throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferListener.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferListener.java
deleted file mode 100644
index f7e9d869887..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferListener.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.filebuffers;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Interface for listeners to file buffer changes.
- *
- * @since 3.0
- */
-public interface IFileBufferListener {
-
- /**
- * Informs the listener about the creation of the given buffer.
- *
- * @param buffer the created file buffer
- */
- void bufferCreated(IFileBuffer buffer);
-
- /**
- * Informs the listener that the given buffer has been disposed. All state information has already
- * been disposed and accessing it is forbidden. However, accessing the file buffer's content is
- * still allowed during the notification.
- *
- * @param buffer the disposed file buffer
- */
- void bufferDisposed(IFileBuffer buffer);
-
- /**
- * Informs the listener about an upcoming replace of the contents of the given buffer.
- *
- * @param buffer the affected file buffer
- */
- void bufferContentAboutToBeReplaced(IFileBuffer buffer);
-
- /**
- * Informs the listener that the buffer of the given buffer has been replaced.
- *
- * @param buffer the affected file buffer
- */
- void bufferContentReplaced(IFileBuffer buffer);
-
- /**
- * Informs the listener about the start of a state changing operation on the given buffer.
- *
- * @param buffer the affected file buffer
- */
- void stateChanging(IFileBuffer buffer);
-
- /**
- * Informs the listener that the dirty state of the given buffer changed to the specified value
- *
- * @param buffer the affected file buffer
- * @param isDirty true
if the buffer is dirty, false
otherwise
- */
- void dirtyStateChanged(IFileBuffer buffer, boolean isDirty);
-
- /**
- * Informs the listener that the state validation changed to the specified value.
- *
- * @param buffer the affected file buffer
- * @param isStateValidated true
if the buffer state is validated, false
- * otherwise
- */
- void stateValidationChanged(IFileBuffer buffer, boolean isStateValidated);
-
- /**
- * Informs the listener that the file underlying the given file buffer has been moved to the given
- * location.
- *
- *
This event is currently only sent if the file buffer is backed by an IFile
.
- *
- * @param buffer the affected file buffer
- * @param path the new location (not just the container)
- */
- void underlyingFileMoved(IFileBuffer buffer, IPath path);
-
- /**
- * Informs the listener that the file underlying the given file buffer has been deleted.
- *
- * @param buffer the affected file buffer
- */
- void underlyingFileDeleted(IFileBuffer buffer);
-
- /**
- * Informs the listener that a state changing operation on the given file buffer failed.
- *
- * @param buffer the affected file buffer
- */
- void stateChangeFailed(IFileBuffer buffer);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferManager.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferManager.java
deleted file mode 100644
index 4fe99f5b5e5..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferManager.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.filebuffers;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A file buffer manager manages file buffers for files while the files are connected to the file
- * buffer manager. In order to connect a file to a file buffer manager call connect
.
- * After that call has successfully completed the file buffer can be obtained by getFileBuffer
- *
. The file buffer is created on the first connect and disposed on the last disconnect.
- * I.e. the file buffer manager keeps track of how often a file is connected and returns the same
- * file buffer to each client as long as the file is connected.
- *
- *
Clients are not supposed to implement that interface.
- *
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IFileBufferManager {
-
- /**
- * Connects the file at the given location to this manager. After that call successfully completed
- * it is guaranteed that each call to getFileBuffer
returns the same file buffer
- * until disconnect
is called.
- *
- *
The provided location is either a full path of a workspace resource or an absolute path in
- * the local file system. The file buffer manager does not resolve the location of workspace
- * resources in the case of linked resources.
- *
- * @param location the location of the file to be connected
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @throws CoreException if the file could not successfully be connected
- * @deprecated As of 3.3, replaced by {@link #connect(IPath, LocationKind, IProgressMonitor)}
- */
- void connect(IPath location, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Connects the file at the given location to this manager. After that call successfully completed
- * it is guaranteed that each call to getFileBuffer
returns the same file buffer
- * until disconnect
is called.
- *
- *
The type of the provided location is specified by the given locationKind
.
- *
- * @param location the location of the file to be connected
- * @param locationKind the kind of the given location
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @throws CoreException if the file could not successfully be connected
- * @see LocationKind
- * @since 3.3
- */
- void connect(IPath location, LocationKind locationKind, IProgressMonitor monitor)
- throws CoreException;
-
- // /**
- // * Connects the given file store to this manager. After that call
- // * successfully completed it is guaranteed that each call to getFileBuffer
- // * returns the same file buffer until disconnect
is called.
- // *
- // * Note: This API must not be used if the given file - // * store maps to a resource contained in the workspace. A file buffer - // * that has been connected using a path will not be found. - // *
- // *
- // * We had to use a different name than connect
for this method
- // * due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=148844
- // *
null
if progress reporting is not
- // desired
- // * @throws CoreException if the file could not successfully be connected
- // * @since 3.3
- // */
- // void connectFileStore(IFileStore fileStore, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Disconnects the file at the given location from this manager. After that call successfully
- * completed there is no guarantee that getFileBuffer
will return a valid file
- * buffer.
- *
- * The provided location is either a full path of a workspace resource or an absolute path in
- * the local file system. The file buffer manager does not resolve the location of workspace
- * resources in the case of linked resources.
- *
- * @param location the location of the file to be disconnected
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @throws CoreException if the file could not successfully be disconnected
- * @deprecated As of 3.3, replaced by {@link #disconnect(IPath, LocationKind, IProgressMonitor)}
- */
- void disconnect(IPath location, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Disconnects the file at the given location from this manager. After that call successfully
- * completed there is no guarantee that getFileBuffer
will return a valid file
- * buffer.
- *
- *
The type of the provided location is specified by the given locationKind
.
- *
- * @param location the location of the file to be disconnected
- * @param locationKind the kind of the given location
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @throws CoreException if the file could not successfully be disconnected
- * @see LocationKind
- * @since 3.3
- */
- void disconnect(IPath location, LocationKind locationKind, IProgressMonitor monitor)
- throws CoreException;
-
- // /**
- // * Disconnects the given file store from this manager. After that
- // * call successfully completed there is no guarantee that getFileBuffer
- // * will return a valid file buffer.
- // *
- // * Note: This API must not be used if the given file - // * store maps to a resource contained in the workspace. A file buffer - // * that has been connected using a path will not be found. - // *
- // *
- // * We had to use a different name than disconnect
for this method
- // * due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=148844
- // *
null
if progress reporting is not
- // desired
- // * @throws CoreException if the file could not successfully be disconnected
- // * @since 3.3
- // */
- // void disconnectFileStore(IFileStore fileStore, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the file buffer managed for the given location or null
if there is no such
- * file buffer.
- *
- * The provided location is either a full path of a workspace resource or an absolute path in
- * the local file system. The file buffer manager does not resolve the location of workspace
- * resources in the case of linked resources.
- *
- * @param location the location
- * @return the file buffer managed for that location or null
- * @deprecated As of 3.3, replaced by {@link #getFileBuffer(IPath, LocationKind)}
- */
- IFileBuffer getFileBuffer(IPath location);
-
- /**
- * Returns the file buffer managed for the given location or null
if there is no such
- * file buffer.
- *
- *
The type of the provided location is specified by the given locationKind
.
- *
- * @param location the location
- * @param locationKind the kind of the given location
- * @return the file buffer managed for that location or null
- * @see LocationKind
- * @since 3.3
- */
- IFileBuffer getFileBuffer(IPath location, LocationKind locationKind);
-
- // /**
- // * Returns the file buffer managed for the given file store or
- // * null
if there is no such file buffer.
- // *
- // * Note: This API must not be used if the given file - // * store maps to a resource contained in the workspace. A file buffer - // * that has been connected using a path will not be found. - // *
- // *
- // * We had to use a different name than getFileBuffer
for this method
- // * due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=148844
- // *
null
- // * @since 3.3
- // */
- // IFileBuffer getFileStoreFileBuffer(IFileStore fileStore);
-
- /**
- * Returns all managed file buffers that are currently connected.
- *
- * Note: It is the clients responsibility to handle disconnected file buffers - * as buffers can be disconnected after calling this method. - * - * @return the file buffers managed by this file buffer manager - * @see #getFileStoreFileBuffers() - * @since 3.4 - */ - IFileBuffer[] getFileBuffers(); - - /** - * Returns all managed file store file buffers that are currently connected. - * - *
Note: It is the clients responsibility to handle disconnected file buffers - * as buffers can be disconnected after calling this method. - * - * @return the file buffers managed by this file buffer manager - * @see #getFileBuffers() - * @since 3.4 - */ - IFileBuffer[] getFileStoreFileBuffers(); - - /** - * Sets the synchronization context for this file buffer manager, i.e., for all file buffers this - * manager manages. - * - * @param context the synchronization context managed by this file buffer manager - */ - void setSynchronizationContext(ISynchronizationContext context); - - /** - * Executes the given runnable in the synchronization context of this file buffer manager. If - * there is no synchronization context connected with this manager, the runnable is directly - * executed. - * - * @param runnable the runnable to be executed - * @since 3.5 - */ - public void execute(Runnable runnable); - - /** - * The caller requests that the synchronization context is used to synchronize the given location - * with its file buffer. This call as no effect if there is no file buffer managed for the given - * location. - * - *
The provided location is either a full path of a workspace resource or an absolute path in - * the local file system. The file buffer manager does not resolve the location of workspace - * resources in the case of linked resources. - * - * @param location the location - * @deprecated As of 3.1, replaced by {@link - * org.eclipse.core.filebuffers.IFileBuffer#requestSynchronizationContext()} - */ - void requestSynchronizationContext(IPath location); - - /** - * The caller no longer requests the synchronization context for the file buffer managed for the - * given location. This method has no effect if there is no file buffer managed for this location. - * - *
The provided location is either a full path of a workspace resource or an absolute path in - * the local file system. The file buffer manager does not resolve the location of workspace - * resources in the case of linked resources. - * - * @param location the location - * @deprecated As of 3.1, replaced by {@link IFileBuffer#releaseSynchronizationContext()} - */ - void releaseSynchronizationContext(IPath location); - - /** - * Adds the given listener to the list of file buffer listeners. After that call the listener is - * informed about changes related to this file buffer manager. If the listener is already - * registered with the file buffer, this call has no effect. - * - * @param listener the listener to be added - */ - void addFileBufferListener(IFileBufferListener listener); - - /** - * Removes the given listener from the list of file buffer listeners. If the listener is not - * registered with this file buffer, this call has no effect. - * - * @param listener the listener to be removed - */ - void removeFileBufferListener(IFileBufferListener listener); - - /** - * Validates the state of the given file buffers and tries to bring the buffer's underlying file - * into a state in which it can be modified. File buffers which do not support state validation - * are left untouched. - * - *
In case of a single file buffer, {@link IFileBuffer#validateState(IProgressMonitor, Object)}
- * should be used.
- *
- * @param fileBuffers the file buffers to validate
- * @param monitor the progress monitor, or null
if progress reporting is not desired
- * @param computationContext the context in which the validation is performed, e.g., a SWT shell
- * @exception CoreException if the underlying file can not be accessed or its state cannot be
- * changed
- * @since 3.1
- */
- void validateState(IFileBuffer[] fileBuffers, IProgressMonitor monitor, Object computationContext)
- throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferStatusCodes.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferStatusCodes.java
deleted file mode 100644
index 3175f52c4b2..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IFileBufferStatusCodes.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2008 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import java.nio.charset.UnmappableCharacterException; - -/** - * This interface provides the list of status codes that are used by the file buffer plug-in when it - * throws {@link org.eclipse.core.runtime.CoreException}. - * - *
Clients are not supposed to implement that interface. - * - * @since 3.1 - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - */ -public interface IFileBufferStatusCodes { - - /** Changing the content of a file buffer failed. */ - int CONTENT_CHANGE_FAILED = 1; - - /** Creation of file buffer failed. */ - int CREATION_FAILED = 2; - - /** - * File buffer status code indicating that an operation failed because a character could not be - * mapped using the given charset. - * - *
Value: {@value} - * - * @see UnmappableCharacterException - * @since 3.2 - */ - int CHARSET_MAPPING_FAILED = 3; - - /** - * File buffer status code indicating that state validation failed. - * - *
Value: {@value} - * - * @see IFileBuffer#validateState(org.eclipse.core.runtime.IProgressMonitor, Object) - * @since 3.3 - */ - int STATE_VALIDATION_FAILED = 4; - - /** - * File buffer status code indicating that a resource is marked derived. - * - *
Value: {@value} - * - * @see org.eclipse.core.resources.IResource#isDerived() - * @since 3.3 - */ - int DERIVED_FILE = 5; -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IStateValidationSupport.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IStateValidationSupport.java deleted file mode 100644 index 915cc3e2e21..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/IStateValidationSupport.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2005 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.filebuffers;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Implementers of {@link org.eclipse.core.filebuffers.IFileBuffer} may also implement
- * IStateValidationSupport
in order to allow a {@link
- * org.eclipse.core.filebuffers.IFileBufferManager} to batch the stages of state validation when
- * calling {@link org.eclipse.core.filebuffers.IFileBufferManager#validateState(IFileBuffer[],
- * org.eclipse.core.runtime.IProgressMonitor, Object)}.
- *
- * @see org.eclipse.core.filebuffers.IFileBuffer
- * @since 3.1
- */
-public interface IStateValidationSupport {
-
- /**
- * Tells this buffer that the validation state is about to be changed. File buffer listeners will
- * receive a {@link IFileBufferListener#stateChanging(IFileBuffer)} notification in response.
- */
- void validationStateAboutToBeChanged();
-
- /**
- * Tells this buffer that the validation state has been changed to the given value. After that
- * call, {@link IFileBuffer#isStateValidated()} will return the given value. Also {@link
- * IFileBuffer#getStatus()} will returns the provided status. File buffer listeners will receive a
- * {@link IFileBufferListener#stateValidationChanged(IFileBuffer, boolean)} notification.
- *
- * @param validationState true
if validated, false
otherwise
- * @param status the status of the executed validate state operation
- */
- void validationStateChanged(boolean validationState, IStatus status);
-
- /**
- * Tells this buffer that a initiated state validation failed. File buffer listeners will receive
- * a {@link IFileBufferListener#stateChangeFailed(IFileBuffer)} notification in response.
- */
- void validationStateChangeFailed();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ISynchronizationContext.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ISynchronizationContext.java
deleted file mode 100644
index cc33cb0af2e..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ISynchronizationContext.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.filebuffers;
-
-/**
- * A file buffer manager (see {@link org.eclipse.core.filebuffers.IFileBufferManager}) uses an
- * ISynchronizationContext
in order to execute commands encapsulated as {@link
- * Runnable}. The synchronization context executes the Runnables
according to a
- * specific synchronization/execution policy. This could be that the given Runnable
is
- * executed in a specific thread or environment or adhere to specific timing constraints. The
- * concrete characteristics of the policy is to be specified by the context implementer.
- *
- *
This interface can be implemented by clients. Clients use {@link - * org.eclipse.core.filebuffers.IFileBufferManager#setSynchronizationContext(ISynchronizationContext)} - * to install a particular synchronization context with a file buffer manager. - * - * @since 3.0 - */ -public interface ISynchronizationContext { - - /** - * Executes the given runnable according to the specified synchronization/execution policy. - * - * @param runnable the runnable to be executed - */ - void run(Runnable runnable); -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ITextFileBuffer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ITextFileBuffer.java deleted file mode 100644 index 478037f8aa6..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ITextFileBuffer.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2008 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.source.IAnnotationModel; - -/** - * A text file buffer is a file buffer for text files. The contents of a text file buffer is given - * in the form of a document and an associated annotation model. Also, the text file buffer provides - * methods to manage the character encoding used to read and write the buffer's underlying text - * file. - * - *
Clients are not supposed to implement that interface. Instances of this type are obtained from - * a {@link org.eclipse.core.filebuffers.ITextFileBufferManager}. - * - * @since 3.0 - * @noimplement This interface is not intended to be implemented by clients. - * @noextend This interface is not intended to be extended by clients. - */ -public interface ITextFileBuffer extends IFileBuffer { - - /** - * Returns the document of this text file buffer. - * - * @return the document of this text file buffer - */ - IDocument getDocument(); - - /** - * Returns the character encoding to be used for reading and writing the buffer's underlying file. - * - *
Note: The encoding used to write the file might differ from the encoding
- * returned by this method if no encoding has been explicitly set and the content type of the file
- * is derived from the content (e.g. an XML file).
- *
- * @return the character encoding
- */
- String getEncoding();
-
- /**
- * Sets the character encoding to be used for reading and writing the buffer's underlying file.
- *
- * @param encoding the encoding
- */
- void setEncoding(String encoding);
-
- /**
- * Returns the annotation model of this text file buffer.
- *
- * @return the annotation model of this text file buffer, might be null
if called
- * when disconnected
- */
- IAnnotationModel getAnnotationModel();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ITextFileBufferManager.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ITextFileBufferManager.java
deleted file mode 100644
index 70742ba637c..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/ITextFileBufferManager.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.core.internal.filebuffers.FileBuffersPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.jface.text.IDocument; - -/** - * A text file buffer manager manages text file buffers for files whose contents is considered text. - * - *
Clients are not supposed to implement that interface.
- *
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITextFileBufferManager extends IFileBufferManager {
-
- /**
- * The default text file buffer manager.
- *
- * @since 3.3
- */
- ITextFileBufferManager DEFAULT = FileBuffersPlugin.getDefault().getFileBufferManager();
-
- // /**
- // * Returns the text file buffer managed for the file at the given location
- // * or null
if either there is no such text file buffer.
- // *
- // * The provided location is either a full path of a workspace resource or - // * an absolute path in the local file system. The file buffer manager does - // * not resolve the location of workspace resources in the case of linked - // * resources. - // *
- // * - // * @param location the location - // * @return the text file buffer managed for that location ornull
- // * @deprecated As of 3.3, replaced by {@link #getTextFileBuffer(IPath, LocationKind)}
- // */
- // ITextFileBuffer getTextFileBuffer(IPath location);
-
- /**
- * Returns the text file buffer managed for the file at the given location or null
if
- * there is no such text file buffer.
- *
- * The type of the provided location is specified by the given locationKind
.
- *
- * @param location the location
- * @param locationKind the kind of the given location
- * @return the text file buffer managed for that location or null
- * @see LocationKind
- * @since 3.3
- */
- ITextFileBuffer getTextFileBuffer(IPath location, LocationKind locationKind);
-
- // /**
- // * Returns the text file buffer managed for the given file store
- // * or null
if there is no such text file buffer.
- // *
- // * Note: This API must not be used if the given file - // * store maps to a resource contained in the workspace. A file buffer - // * that has been connected using a path will not be found. - // *
- // *
- // * We had to use a different name than getTextFileBuffer
for this method
- // * due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=148844
- // *
null
- // * @since 3.3
- // */
- // ITextFileBuffer getFileStoreTextFileBuffer(IFileStore fileStore);
-
- /**
- * Returns the text file buffer managed for the given document or null
if there is no
- * such text file buffer.
- *
- * Note: This method goes through the list of registered buffers and tests
- * whether its document matches the given one. Therefore this method should not be used in
- * performance critical code.
- *
- * @param document the document for which to find the text file buffer
- * @return the text file buffer managed for that document or null
- * @since 3.3
- */
- ITextFileBuffer getTextFileBuffer(IDocument document);
-
- /**
- * Returns the default encoding that is used to read the contents of text files if no other
- * encoding is specified.
- *
- * @return the default text file encoding
- */
- String getDefaultEncoding();
-
- /**
- * Creates a new empty document. The document is set up in the same way as it would be used in a
- * text file buffer for a file at the given location.
- *
- *
The provided location is either a full path of a workspace resource or an absolute path in
- * the local file system. The file buffer manager does not resolve the location of workspace
- * resources in the case of linked resources.
- *
- * @param location the location used to set up the newly created document or null
if
- * unknown
- * @return a new empty document
- * @deprecated As of 3.3, replaced by {@link #createEmptyDocument(IPath, LocationKind)}
- */
- IDocument createEmptyDocument(IPath location);
-
- /**
- * Creates a new empty document. The document is set up in the same way as it would be used in a
- * text file buffer for a file at the given location.
- *
- *
The type of the provided location is specified by the given locationKind
.
- *
- * @param location the location used to set up the newly created document or null
if
- * unknown
- * @param locationKind the kind of the given location
- * @return a new empty document
- * @since 3.3
- */
- IDocument createEmptyDocument(IPath location, LocationKind locationKind);
-
- // /**
- // * Creates a new annotation for the given location.
- // *
- // * The provided location is either a full path of a workspace resource or an - // * absolute path in the local file system. The file buffer manager does not - // * resolve the location of workspace resources in the case of linked - // * resources. - // *
- // * - // * @param location the location used to create the new annotation model - // * @return the newly created annotation model - // * @deprecated As of 3.3, replaced by {@link #createAnnotationModel(IPath, LocationKind)} - // */ - // IAnnotationModel createAnnotationModel(IPath location); - // - // /** - // * Creates a new annotation for the given location. - // *
- // * The type of the provided location is specified by the given
- // * locationKind
.
- // *
true
. If the file does
- // * not exist, it is checked whether a text content type is associated with
- // * the given location. If no content type is associated with the location,
- // * this method returns true
.
- // * - // * The provided location is either a full path of a workspace resource or an - // * absolute path in the local file system. The file buffer manager does not - // * resolve the location of workspace resources in the case of linked - // * resources. - // *
- // * - // * @param location the location to check - // * @returntrue
if the location is a text file location
- // * @since 3.1
- // * @deprecated As of 3.2, replaced by {@link #isTextFileLocation(IPath, boolean)}
- // */
- // boolean isTextFileLocation(IPath location);
- /**
- * Returns whether a file at the given location is or can be considered a text file. If the file
- * exists, the concrete content type of the file is checked. If the concrete content type for the
- * existing file can not be determined, this method returns !strict
. If the file does
- * not exist, it is checked whether a text content type is associated with the given location. If
- * no content type is associated with the location, this method returns !strict
.
- *
- * The provided location is either a full path of a workspace resource or an absolute path in
- * the local file system. The file buffer manager does not resolve the location of workspace
- * resources in the case of linked resources.
- *
- * @param location the location to check
- * @param strict true
if a file with unknown content type is not treated as text
- * file, false
otherwise
- * @return true
if the location is a text file location
- * @since 3.2
- */
- boolean isTextFileLocation(IPath location, boolean strict);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/LocationKind.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/LocationKind.java
deleted file mode 100644
index a2b01700f97..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/filebuffers/LocationKind.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2007,
- * 2008 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.filebuffers; - -import org.eclipse.core.runtime.IPath; - -/** - * Type-safe enum of the available location kinds. - * - * @since 3.3 - * @noinstantiate This class is not intended to be instantiated by clients. - */ -public final class LocationKind { - - /** - * The corresponding argument is a location in a file system. - * - *
Note: File buffers that are connected using a file store will not be found. - * - * @see IFileBufferManager#connectFileStore(org.eclipse.core.filesystem.IFileStore, - * org.eclipse.core.runtime.IProgressMonitor) - */ - public static final LocationKind LOCATION = new LocationKind("location"); // $NON-NLS-1$ - - /** - * The corresponding argument is the full path of an {@link org.eclipse.core.resources.IFile}. - * - * @see org.eclipse.core.resources.IFile#getFullPath() - */ - public static final LocationKind IFILE = new LocationKind("IFile"); // $NON-NLS-1$ - - /** - * Tells to normalize the corresponding argument according to {@link - * FileBuffers#normalizeLocation(IPath)}. - * - *
Note:: If the normalized path is not in the workspace then a file buffer - * that might be connected using a file store will not be found. - * - * @see IFileBufferManager#connectFileStore(org.eclipse.core.filesystem.IFileStore, - * org.eclipse.core.runtime.IProgressMonitor) - */ - public static final LocationKind NORMALIZE = new LocationKind("normalize"); // $NON-NLS-1$ - - private final String fName; - - LocationKind(String name) { - fName = name; - } - - /* - * @see java.lang.Object#toString() - */ - public String toString() { - return fName; - } -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java deleted file mode 100644 index 43ba85e1e69..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/AbstractFileBuffer.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2007 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import org.eclipse.core.filebuffers.IFileBuffer;
-import org.eclipse.core.filebuffers.IStateValidationSupport;
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.IDocumentExtension4;
-
-/** @since 3.0 */
-public abstract class AbstractFileBuffer implements IFileBuffer, IStateValidationSupport {
-
- /**
- * The element for which the info is stored.
- *
- * @since 3.3
- */
- protected IFileStore fFileStore;
- /**
- * The text file buffer manager.
- *
- * @since 3.4 (pulled up from subclasses)
- */
- protected final TextFileBufferManager fManager;
-
- public AbstractFileBuffer(TextFileBufferManager manager) {
- fManager = manager;
- }
-
- public abstract void create(IPath location, IProgressMonitor monitor) throws CoreException;
-
- public abstract void connect();
-
- public abstract void disconnect() throws CoreException;
-
- /**
- * Returns whether this file buffer has been disconnected.
- *
- * @return true
if already disposed, false
otherwise
- * @since 3.1
- */
- protected abstract boolean isDisconnected();
-
- /**
- * Disposes this file buffer. This implementation is always empty.
- *
- *
Subclasses may extend but must call super.dispose()
.
- *
- *
- * - * @since 3.1 - */ - protected void dispose() {} - - /* - * @see org.eclipse.core.filebuffers.IStateValidationSupport#validationStateAboutToBeChanged() - */ - public void validationStateAboutToBeChanged() { - fManager.fireStateChanging(this); - } - - /* - * @see org.eclipse.core.filebuffers.IStateValidationSupport#validationStateChangeFailed() - */ - public void validationStateChangeFailed() { - fManager.fireStateChangeFailed(this); - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#getModificationStamp() - */ - public long getModificationStamp() { - IFileInfo info = fFileStore.fetchInfo(); - return info.exists() ? info.getLastModified() : IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#getFileStore() - * @since 3.3 - */ - public IFileStore getFileStore() { - return fFileStore; - } -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/DocumentReader.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/DocumentReader.java deleted file mode 100644 index 525ea5c3ab2..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/DocumentReader.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2007 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import java.io.IOException;
-import java.io.Reader;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-
-/**
- * A Reader
that reads from an IDocument
. The reader ensures that its
- * content is the same as the document content when the stream was created.
- *
- *
Note that {@link #close()} must be called to release any acquired resources. - * - * @since 3.1 - */ -class DocumentReader extends Reader { - - /** Document based character sequence. */ - private static class DocumentCharSequence implements CharSequence { - - /** Document */ - private IDocument fDocument; - - /** - * Initialize with the sequence of characters in the given document. - * - * @param document the document - */ - public DocumentCharSequence(IDocument document) { - fDocument = document; - } - - /* - * @see java.lang.CharSequence#length() - */ - public int length() { - return fDocument.getLength(); - } - - /* - * @see java.lang.CharSequence#charAt(int) - */ - public char charAt(int index) { - try { - return fDocument.getChar(index); - } catch (BadLocationException x) { - throw new IndexOutOfBoundsException(x.getLocalizedMessage()); - } - } - - /* - * @see java.lang.CharSequence#subSequence(int, int) - */ - public CharSequence subSequence(int start, int end) { - try { - return fDocument.get(start, end - start); - } catch (BadLocationException x) { - throw new IndexOutOfBoundsException(x.getLocalizedMessage()); - } - } - } - - /** Internal document listener. */ - private class InternalDocumentListener implements IDocumentListener { - - /* - * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent) - */ - public void documentAboutToBeChanged(DocumentEvent event) { - handleDocumentAboutToBeChanged(); - } - - /* - * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent) - */ - public void documentChanged(DocumentEvent event) {} - } - - /** The character sequence. */ - private volatile CharSequence fCharSequence; - - /** Document length. */ - private int fLength; - - /** The current offset. */ - private int fOffset = 0; - - /** The document. */ - private IDocument fDocument; - - /** The document listener. */ - private IDocumentListener fDocumentListener = new InternalDocumentListener(); - - /** - * Creates a new document input stream and initializes the stream to read from the given document. - * - * @param document the document - */ - public DocumentReader(IDocument document) { - Assert.isNotNull(document); - fDocument = document; - fCharSequence = new DocumentCharSequence(fDocument); - fDocument.addDocumentListener(fDocumentListener); - fLength = fCharSequence.length(); - } - - /* - * @see java.io.InputStream#close() - */ - public void close() throws IOException { - synchronized (this) { - fCharSequence = null; - } - releaseDocument(); - } - - /** Copies the document prior to modification and removes the document listener. */ - private void handleDocumentAboutToBeChanged() { - IDocument document = fDocument; - if (fCharSequence == null || document == null) return; - String content = document.get(); - synchronized (this) { - if (fCharSequence == null) return; - fCharSequence = content; - } - releaseDocument(); - } - - /** Removes the document listener. */ - private synchronized void releaseDocument() { - if (fDocument != null) fDocument.removeDocumentListener(fDocumentListener); - fDocument = null; - fDocumentListener = null; - } - - /* - * @see java.io.Reader#read(char[], int, int) - * @since 3.1 - */ - public int read(char[] cbuf, int off, int len) throws IOException { - int i = 0; - try { - for (; i < len && fOffset < fLength; i++) cbuf[off + i] = fCharSequence.charAt(fOffset++); - if (i > 0) return i; - - return -1; - } catch (NullPointerException x) { - throw new IOException(FileBuffersMessages.DocumentInputStream_error_streamClosed); - } catch (IndexOutOfBoundsException x) { - return i - 1; - } - } -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/ExtensionsRegistry.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/ExtensionsRegistry.java deleted file mode 100644 index 37922ee4f3b..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/ExtensionsRegistry.java +++ /dev/null @@ -1,566 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2009 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.content.IContentType;
-
-/**
- * This registry manages sharable document factories and setup participants that are specified in
- * plugin.xml
.
- */
-public class ExtensionsRegistry {
-
- /**
- * Adapts {@link IContentType} with the ability to check equality. This allows to use them in a
- * collection.
- */
- private static class ContentTypeAdapter {
-
- /** The adapted content type. */
- private IContentType fContentType;
-
- /**
- * Creates a new content type adapter for the given content type.
- *
- * @param contentType the content type to be adapted
- */
- public ContentTypeAdapter(IContentType contentType) {
- Assert.isNotNull(contentType);
- fContentType = contentType;
- }
-
- /**
- * Return the id of the adapted content type.
- *
- * @return the id
- */
- public String getId() {
- return fContentType.getId();
- }
-
- /*
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return obj instanceof ContentTypeAdapter
- && fContentType.getId().equals(((ContentTypeAdapter) obj).getId());
- }
-
- /*
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return fContentType.getId().hashCode();
- }
- }
-
- protected static final String WILDCARD = "*"; // $NON-NLS-1$
-
- /**
- * The mapping between file attributes and configuration elements describing document factories.
- */
- private Map fFactoryDescriptors = new HashMap();
- /**
- * The mapping between configuration elements for document factories and instantiated document
- * factories.
- */
- private Map fFactories = new HashMap();
- /**
- * The mapping between file attributes and configuration elements describing document setup
- * participants.
- */
- private Map fSetupParticipantDescriptors = new HashMap();
- /**
- * The mapping between configuration elements for setup participants and instantiated setup
- * participants.
- */
- private Map fSetupParticipants = new HashMap();
- /**
- * The mapping between file attributes and configuration elements describing annotation model
- * factories.
- */
- private Map fAnnotationModelFactoryDescriptors = new HashMap();
- /** The mapping between configuration elements for annotation model factories */
- private Map fAnnotationModelFactories = new HashMap();
- /** The content type manager. */
- // protected IContentTypeManager fContentTypeManager= Platform.getContentTypeManager();
-
- /**
- * Creates a new document factory registry and initializes it with the information found in the
- * plug-in registry.
- */
- public ExtensionsRegistry() {
- // initialize("documentCreation", "contentTypeId", true, fFactoryDescriptors); //$NON-NLS-1$
- // //$NON-NLS-2$
- // initialize("documentCreation", "fileNames", false, fFactoryDescriptors); //$NON-NLS-1$
- // //$NON-NLS-2$
- // initialize("documentCreation", "extensions", false, fFactoryDescriptors); //$NON-NLS-1$
- // //$NON-NLS-2$
- // initialize("documentSetup", "contentTypeId", true, fSetupParticipantDescriptors);
- // //$NON-NLS-1$ //$NON-NLS-2$
- // initialize("documentSetup", "fileNames", false, fSetupParticipantDescriptors); //$NON-NLS-1$
- // //$NON-NLS-2$
- // initialize("documentSetup", "extensions", false, fSetupParticipantDescriptors);
- // //$NON-NLS-1$ //$NON-NLS-2$
- // initialize("annotationModelCreation", "contentTypeId", true,
- // fAnnotationModelFactoryDescriptors); //$NON-NLS-1$ //$NON-NLS-2$
- // initialize("annotationModelCreation", "fileNames", false,
- // fAnnotationModelFactoryDescriptors); //$NON-NLS-1$ //$NON-NLS-2$
- // initialize("annotationModelCreation", "extensions", false,
- // fAnnotationModelFactoryDescriptors); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- /**
- * Reads the comma-separated value from the given configuration element for the given attribute
- * name and remembers the configuration element in the given map under the individual tokens of
- * the attribute value.
- *
- * @param attributeName the name of the attribute
- * @param element the configuration element
- * @param map the map which remembers the configuration element
- */
- private void read(String attributeName, IConfigurationElement element, Map map) {
- String value = element.getAttribute(attributeName);
- if (value != null) {
- StringTokenizer tokenizer = new StringTokenizer(value, ","); // $NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken().trim();
-
- Set s = (Set) map.get(token);
- if (s == null) {
- s = new HashSet();
- map.put(token, s);
- }
- s.add(element);
- }
- }
- }
-
- // /**
- // * Reads the value from the given configuration element for the given attribute name and
- // remembers
- // * the configuration element in the given map under the individual content type of the
- // attribute value.
- // *
- // * @param attributeName the name of the attribute
- // * @param element the configuration element
- // * @param map the map which remembers the configuration element
- // */
- // private void readContentType(String attributeName, IConfigurationElement element, Map map) {
- // String value= element.getAttribute(attributeName);
- // if (value != null) {
- // IContentType contentType= fContentTypeManager.getContentType(value);
- // if (contentType == null) {
- // log(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, NLSUtility
- // .format(FileBuffersMessages.ExtensionsRegistry_error_contentTypeDoesNotExist, value),
- // null));
- // return;
- // }
- // ContentTypeAdapter adapter= new ContentTypeAdapter(contentType);
- // Set s= (Set) map.get(adapter);
- // if (s == null) {
- // s= new HashSet();
- // map.put(adapter, s);
- // }
- // s.add(element);
- // }
- // }
-
- /**
- * Adds an entry to the log of this plug-in for the given status
- *
- * @param status the status to log
- */
- private void log(IStatus status) {
- // ILog log= FileBuffersPlugin.getDefault().getLog();
- ResourcesPlugin.log(status);
- }
-
- // /**
- // * Initializes this registry. It retrieves all implementers of the given
- // * extension point and remembers those implementers based on the
- // * file name extensions in the given map.
- // *
- // * @param extensionPointName the name of the extension point
- // * @param childElementName the name of the child elements
- // * @param isContentTypeId the child element is a content type id
- // * @param descriptors the map to be filled
- // */
- // private void initialize(String extensionPointName, String childElementName, boolean
- // isContentTypeId, Map descriptors) {
- //
- // IExtensionPoint extensionPoint=
- // Platform.getExtensionRegistry().getExtensionPoint(FileBuffersPlugin.PLUGIN_ID,
- // extensionPointName);
- // if (extensionPoint == null) {
- // log(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, 0, NLSUtility
- // .format(FileBuffersMessages.ExtensionsRegistry_error_extensionPointNotFound,
- // extensionPointName), null));
- // return;
- // }
- //
- // IConfigurationElement[] elements= extensionPoint.getConfigurationElements();
- // for (int i= 0; i < elements.length; i++) {
- // if (isContentTypeId)
- // readContentType(childElementName, elements[i], descriptors);
- // else
- // read(childElementName, elements[i], descriptors);
- // }
- // }
-
- /**
- * Returns the executable extension for the given configuration element. If there is no
- * instantiated extension remembered for this element, a new extension is created and put into the
- * cache if it is of the requested type.
- *
- * @param entry the configuration element
- * @param extensions the map of instantiated extensions
- * @param extensionType the requested result type
- * @return the executable extension for the given configuration element.
- */
- private Object getExtension(IConfigurationElement entry, Map extensions, Class extensionType) {
- Object extension = extensions.get(entry);
- if (extension != null) return extension;
-
- try {
- extension = entry.createExecutableExtension("class"); // $NON-NLS-1$
- } catch (CoreException x) {
- log(x.getStatus());
- }
-
- if (extensionType.isInstance(extension)) {
- extensions.put(entry, extension);
- return extension;
- }
-
- return null;
- }
-
- /**
- * Returns the first enumerated element of the given set.
- *
- * @param set the set from which to choose
- * @return the selected configuration element
- */
- private IConfigurationElement selectConfigurationElement(Set set) {
- if (set != null && !set.isEmpty()) {
- Iterator e = set.iterator();
- return (IConfigurationElement) e.next();
- }
- return null;
- }
-
- /**
- * Returns a sharable document factory for the given file name or file extension.
- *
- * @param nameOrExtension the name or extension to be used for lookup
- * @return the sharable document factory or null
- * @deprecated As of 3.5
- */
- protected org.eclipse.core.filebuffers.IDocumentFactory getDocumentFactory(
- String nameOrExtension) {
- Set set = (Set) fFactoryDescriptors.get(nameOrExtension);
- if (set != null) {
- IConfigurationElement entry = selectConfigurationElement(set);
- return (org.eclipse.core.filebuffers.IDocumentFactory)
- getExtension(entry, fFactories, org.eclipse.core.filebuffers.IDocumentFactory.class);
- }
- return null;
- }
-
- /**
- * Returns a sharable document factory for the given content types.
- *
- * @param contentTypes the content types used to find the factory
- * @return the sharable document factory or null
- * @deprecated As of 3.5
- */
- protected org.eclipse.core.filebuffers.IDocumentFactory doGetDocumentFactory(
- IContentType[] contentTypes) {
- Set set = null;
- int i = 0;
- while (i < contentTypes.length && set == null) {
- set = (Set) fFactoryDescriptors.get(new ContentTypeAdapter(contentTypes[i++]));
- }
-
- if (set != null) {
- IConfigurationElement entry = selectConfigurationElement(set);
- return (org.eclipse.core.filebuffers.IDocumentFactory)
- getExtension(entry, fFactories, org.eclipse.core.filebuffers.IDocumentFactory.class);
- }
- return null;
- }
-
- /**
- * Returns a sharable document factory for the given content types. This method considers the base
- * content types of the given set of content types.
- *
- * @param contentTypes the content types used to find the factory
- * @return the sharable document factory or null
- * @deprecated As of 3.5
- */
- protected org.eclipse.core.filebuffers.IDocumentFactory getDocumentFactory(
- IContentType[] contentTypes) {
- org.eclipse.core.filebuffers.IDocumentFactory factory = doGetDocumentFactory(contentTypes);
- while (factory == null) {
- contentTypes = computeBaseContentTypes(contentTypes);
- if (contentTypes == null) break;
- factory = doGetDocumentFactory(contentTypes);
- }
- return factory;
- }
-
- /**
- * Returns the set of setup participants for the given file name or extension.
- *
- * @param nameOrExtension the name or extension to be used for lookup
- * @return the sharable set of document setup participants
- */
- protected List getDocumentSetupParticipants(String nameOrExtension) {
- Set set = (Set) fSetupParticipantDescriptors.get(nameOrExtension);
- if (set == null) return null;
-
- List participants = new ArrayList();
- Iterator e = set.iterator();
- while (e.hasNext()) {
- IConfigurationElement entry = (IConfigurationElement) e.next();
- Object participant = getExtension(entry, fSetupParticipants, IDocumentSetupParticipant.class);
- if (participant != null) participants.add(participant);
- }
-
- return participants;
- }
-
- /**
- * Returns the set of setup participants for the given content types.
- *
- * @param contentTypes the contentTypes to be used for lookup
- * @return the sharable set of document setup participants
- */
- private List doGetDocumentSetupParticipants(IContentType[] contentTypes) {
- Set resultSet = new HashSet();
- int i = 0;
- while (i < contentTypes.length) {
- Set set = (Set) fSetupParticipantDescriptors.get(new ContentTypeAdapter(contentTypes[i++]));
- if (set != null) resultSet.addAll(set);
- }
-
- List participants = new ArrayList();
- Iterator e = resultSet.iterator();
- while (e.hasNext()) {
- IConfigurationElement entry = (IConfigurationElement) e.next();
- Object participant = getExtension(entry, fSetupParticipants, IDocumentSetupParticipant.class);
- if (participant != null) participants.add(participant);
- }
-
- return participants.isEmpty() ? null : participants;
- }
-
- /**
- * Returns the set of setup participants for the given content types. This method considers the
- * base content types of the given set of content types.
- *
- * @param contentTypes the contentTypes to be used for lookup
- * @return the sharable set of document setup participants
- */
- protected List getDocumentSetupParticipants(IContentType[] contentTypes) {
- List participants = doGetDocumentSetupParticipants(contentTypes);
- while (participants == null) {
- contentTypes = computeBaseContentTypes(contentTypes);
- if (contentTypes == null) break;
- participants = doGetDocumentSetupParticipants(contentTypes);
- }
- return participants;
- }
- //
- // /**
- // * Returns a sharable annotation model factory for the given content types.
- // *
- // * @param contentTypes the content types used to find the factory
- // * @return the sharable annotation model factory or null
- // */
- // private IAnnotationModelFactory doGetAnnotationModelFactory(IContentType[] contentTypes) {
- // Set set= null;
- // int i= 0;
- // while (i < contentTypes.length && set == null) {
- // set= (Set) fAnnotationModelFactoryDescriptors.get(new ContentTypeAdapter(contentTypes[i++]));
- // }
- //
- // if (set != null) {
- // IConfigurationElement entry= selectConfigurationElement(set);
- // return (IAnnotationModelFactory) getExtension(entry, fAnnotationModelFactories,
- // IAnnotationModelFactory.class);
- // }
- // return null;
- // }
-
- // /**
- // * Returns a sharable annotation model factory for the given content types.
- // * This method considers the base content types of the given set of content
- // * types.
- // *
- // * @param contentTypes the content types used to find the factory
- // * @return the sharable annotation model factory or null
- // */
- // protected IAnnotationModelFactory getAnnotationModelFactory(IContentType[] contentTypes) {
- // IAnnotationModelFactory factory= doGetAnnotationModelFactory(contentTypes);
- // while (factory == null) {
- // contentTypes= computeBaseContentTypes(contentTypes);
- // if (contentTypes == null)
- // break;
- // factory= doGetAnnotationModelFactory(contentTypes);
- // }
- // return factory;
- // }
-
- // /**
- // * Returns a sharable annotation model factory for the given file name or file extension.
- // *
- // * @param extension the name or extension to be used for lookup
- // * @return the sharable document factory or null
- // */
- // protected IAnnotationModelFactory getAnnotationModelFactory(String extension) {
- // Set set= (Set) fAnnotationModelFactoryDescriptors.get(extension);
- // if (set != null) {
- // IConfigurationElement entry= selectConfigurationElement(set);
- // return (IAnnotationModelFactory) getExtension(entry, fAnnotationModelFactories,
- // IAnnotationModelFactory.class);
- // }
- // return null;
- // }
-
- // /**
- // * Returns the set of content types for the given location.
- // *
- // * @param location the location for which to look up the content types
- // * @param locationKind the kind of the given location
- // * @return the set of content types for the location
- // * @since 3.3
- // */
- // protected IContentType[] findContentTypes(IPath location, LocationKind locationKind) {
- // Assert.isLegal(locationKind != LocationKind.IFILE);
- // return fContentTypeManager.findContentTypesFor(location.lastSegment());
- // }
-
- /**
- * Returns the set of direct base content types for the given set of content types. Returns
- * null
if non of the given content types has a direct base content type.
- *
- * @param contentTypes the content types
- * @return the set of direct base content types
- */
- private IContentType[] computeBaseContentTypes(IContentType[] contentTypes) {
- List baseTypes = new ArrayList();
- for (int i = 0; i < contentTypes.length; i++) {
- IContentType baseType = contentTypes[i].getBaseType();
- if (baseType != null) baseTypes.add(baseType);
- }
-
- IContentType[] result = null;
- int size = baseTypes.size();
- if (size > 0) {
- result = new IContentType[size];
- baseTypes.toArray(result);
- }
- return result;
- }
-
- // /**
- // * Returns the sharable document factory for the given location.
- // *
- // * @param location the location for which to looked up the factory
- // * @param locationKind the kind of the given location
- // * @return the sharable document factory
- // * @since 3.3
- // * @deprecated As of 3.5
- // */
- // public org.eclipse.core.filebuffers.IDocumentFactory getDocumentFactory(IPath location,
- // LocationKind locationKind) {
- // org.eclipse.core.filebuffers.IDocumentFactory factory=
- // getDocumentFactory(findContentTypes(location, locationKind));
- // if (factory == null)
- // factory= getDocumentFactory(location.lastSegment());
- // if (factory == null)
- // factory= getDocumentFactory(location.getFileExtension());
- // if (factory == null)
- // factory= getDocumentFactory(WILDCARD);
- // return factory;
- // }
- //
- // /**
- // * Returns the sharable set of document setup participants for the given location.
- // *
- // * @param location the location for which to look up the setup participants
- // * @param locationKind the kind of the given location
- // * @return the sharable set of document setup participants
- // * @since 3.3
- // */
- // public IDocumentSetupParticipant[] getDocumentSetupParticipants(IPath location, LocationKind
- // locationKind) {
- // Set participants= new HashSet();
- //
- // List p= getDocumentSetupParticipants(findContentTypes(location, locationKind));
- // if (p != null)
- // participants.addAll(p);
- //
- // p= getDocumentSetupParticipants(location.lastSegment());
- // if (p != null)
- // participants.addAll(p);
- //
- // p= getDocumentSetupParticipants(location.getFileExtension());
- // if (p != null)
- // participants.addAll(p);
- //
- // p= getDocumentSetupParticipants(WILDCARD);
- // if (p != null)
- // participants.addAll(p);
- //
- // IDocumentSetupParticipant[] result= new IDocumentSetupParticipant[participants.size()];
- // participants.toArray(result);
- // return result;
- // }
-
- // /**
- // * Returns the sharable annotation model factory for the given location.
- // *
- // * @param location the location for which to look up the factory
- // * @param locationKind the kind of the given location
- // * @return the sharable annotation model factory
- // * @since 3.3
- // */
- // public IAnnotationModelFactory getAnnotationModelFactory(IPath location, LocationKind
- // locationKind) {
- // IAnnotationModelFactory factory= getAnnotationModelFactory(findContentTypes(location,
- // locationKind));
- // if (factory == null)
- // factory= getAnnotationModelFactory(location.lastSegment());
- // if (factory == null)
- // factory= getAnnotationModelFactory(location.getFileExtension());
- // if (factory == null)
- // factory= getAnnotationModelFactory(WILDCARD);
- // return factory;
- // }
-
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java
deleted file mode 100644
index 28177f59cd7..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.internal.filebuffers; - -import org.eclipse.osgi.util.NLS; - -/** - * Helper class to get NLSed messages. - * - * @since 3.0 - */ -final class FileBuffersMessages extends NLS { - - private static final String BUNDLE_NAME = FileBuffersMessages.class.getName(); - - private FileBuffersMessages() { - // Do not instantiate - } - - public static String ExtensionsRegistry_error_extensionPointNotFound; - public static String ExtensionsRegistry_error_contentTypeDoesNotExist; - public static String ResourceFileBuffer_error_cannot_determine_URI; - public static String ResourceFileBuffer_warning_fileIsDerived; - public static String ResourceFileBuffer_stateValidationFailed; - public static String FileBuffer_error_outOfSync; - public static String FileBuffer_status_error; - public static String FileBuffer_error_queryContentDescription; - public static String FileBufferManager_error_canNotCreateFilebuffer; - public static String ResourceTextFileBuffer_error_charset_mapping_failed_message_arg; - public static String ResourceTextFileBuffer_error_unsupported_encoding_message_arg; - public static String ResourceTextFileBuffer_error_illegal_encoding_message_arg; - public static String ResourceTextFileBuffer_task_saving; - public static String ResourceFileBuffer_task_creatingFileBuffer; - public static String JavaTextFileBuffer_error_closeStream; - public static String TextFileBufferManager_error_documentSetupFailed; - public static String TextFileBufferManager_error_documentFactoryFailed; - public static String TextFileBufferManager_warning_documentSetupInstallsDefaultPartitioner; - public static String DocumentInputStream_error_streamClosed; - - static { - NLS.initializeMessages(BUNDLE_NAME, FileBuffersMessages.class); - } -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileBuffersPlugin.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileBuffersPlugin.java deleted file mode 100644 index aa99f9ae87e..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileBuffersPlugin.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2000, - * 2007 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import com.google.inject.Singleton;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The plug-in runtime class for the file buffers plug-in (id "org.eclipse.core.filebuffers"
- *
).
- *
- * @since 3.0
- */
-@Singleton
-public class FileBuffersPlugin /*extends Plugin*/ {
- private static final Logger LOG = LoggerFactory.getLogger(FileBuffersPlugin.class);
- public static final String PLUGIN_ID = "org.eclipse.core.filebuffers"; // $NON-NLS-1$
-
- /** The shared plug-in instance */
- private static FileBuffersPlugin fgPlugin;
- /** The file buffer manager */
- private ITextFileBufferManager fTextFileBufferManager;
-
- /** Creates a plug-in instance. */
- public FileBuffersPlugin() {
- Assert.isTrue(fgPlugin == null);
- fgPlugin = this;
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the default plug-in instance
- */
- public static FileBuffersPlugin getDefault() {
- return fgPlugin;
- }
-
- /**
- * Returns the text file buffer manager of this plug-in.
- *
- * @return the text file buffer manager of this plug-in
- */
- public synchronized ITextFileBufferManager getFileBufferManager() {
- if (fTextFileBufferManager == null) {
- // Bundle resourcesBundle = Platform.getBundle("org.eclipse.core.resources"); //$NON-NLS-1$
- // if (resourcesBundle != null)
- // fTextFileBufferManager = new ResourceTextFileBufferManager();
- // else
- fTextFileBufferManager = new TextFileBufferManager();
- }
- return fTextFileBufferManager;
- }
-
- public void log(IStatus status) {
- LOG.error(status.getMessage(), status.getException());
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileStoreFileBuffer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileStoreFileBuffer.java
deleted file mode 100644
index bc2ce2805c5..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileStoreFileBuffer.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2008 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
Contributors: IBM Corporation - initial API and implementation - * ***************************************************************************** - */ -package org.eclipse.core.internal.filebuffers; - -import org.eclipse.core.filesystem.EFS; -import org.eclipse.core.filesystem.IFileInfo; -import org.eclipse.core.filesystem.IFileStore; -import org.eclipse.core.filesystem.URIUtil; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.jface.text.IDocumentExtension4; - -/** @since 3.3 (previously available as JavaFileBuffer since 3.0) */ -public abstract class FileStoreFileBuffer extends AbstractFileBuffer { - - /** The location */ - protected IPath fLocation; - /** How often the element has been connected */ - protected int fReferenceCount; - /** Can the element be saved */ - protected boolean fCanBeSaved = false; - /** The status of this element */ - protected IStatus fStatus; - /** The time stamp at which this buffer synchronized with the underlying file. */ - protected long fSynchronizationStamp = IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP; - /** How often the synchronization context has been requested */ - protected int fSynchronizationContextCount; - - public FileStoreFileBuffer(TextFileBufferManager manager) { - super(manager); - } - - protected abstract void addFileBufferContentListeners(); - - protected abstract void removeFileBufferContentListeners(); - - protected abstract void initializeFileBufferContent(IProgressMonitor monitor) - throws CoreException; - - protected abstract void commitFileBufferContent(IProgressMonitor monitor, boolean overwrite) - throws CoreException; - - public void create(IFileStore fileStore, IProgressMonitor monitor) throws CoreException { - IFileInfo info = fileStore.fetchInfo(); - fFileStore = fileStore; - if (fLocation == null) fLocation = URIUtil.toPath(fileStore.toURI()); - - initializeFileBufferContent(monitor); - if (info.exists()) fSynchronizationStamp = info.getLastModified(); - - addFileBufferContentListeners(); - } - - public void create(IPath location, IProgressMonitor monitor) throws CoreException { - fLocation = location; - create(EFS.getStore(URIUtil.toURI(getLocation())), monitor); - } - - public void connect() { - ++fReferenceCount; - if (fReferenceCount == 1) connected(); - } - - /** - * Called when this file buffer has been connected. This is the case when there is exactly one - * connection. - * - *
Clients may extend this method.
- */
- protected void connected() {}
-
- public void disconnect() throws CoreException {
- --fReferenceCount;
- if (fReferenceCount <= 0) disconnected();
- }
-
- /**
- * Called when this file buffer has been disconnected. This is the case when the number of
- * connections drops below 1
.
- *
- *
Clients may extend this method. - */ - protected void disconnected() {} - - /* - * @see org.eclipse.core.internal.filebuffers.AbstractFileBuffer#isDisconnected() - * @since 3.1 - */ - protected boolean isDisconnected() { - return fReferenceCount <= 0; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#getLocation() - */ - public IPath getLocation() { - return fLocation; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#commit(org.eclipse.core.runtime.IProgressMonitor, boolean) - */ - public void commit(IProgressMonitor monitor, boolean overwrite) throws CoreException { - if (!isDisconnected() && fCanBeSaved) { - - fManager.fireStateChanging(this); - - try { - commitFileBufferContent(monitor, overwrite); - } catch (CoreException x) { - fManager.fireStateChangeFailed(this); - throw x; - } catch (RuntimeException x) { - fManager.fireStateChangeFailed(this); - throw x; - } - - fCanBeSaved = false; - addFileBufferContentListeners(); - fManager.fireDirtyStateChanged(this, fCanBeSaved); - } - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#computeCommitRule() - */ - public ISchedulingRule computeCommitRule() { - return null; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#isDirty() - */ - public boolean isDirty() { - return fCanBeSaved; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#setDirty(boolean) - */ - public void setDirty(boolean isDirty) { - fCanBeSaved = isDirty; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#isShared() - */ - public boolean isShared() { - return fReferenceCount > 1; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#computeValidateStateRule() - */ - public ISchedulingRule computeValidateStateRule() { - return null; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#validateState(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object) - */ - public void validateState(IProgressMonitor monitor, Object computationContext) - throws CoreException { - // nop - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#isStateValidated() - */ - public boolean isStateValidated() { - return true; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#resetStateValidation() - */ - public void resetStateValidation() { - // nop - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#isSynchronized() - */ - public boolean isSynchronized() { - return fSynchronizationStamp == getModificationStamp(); - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#requestSynchronizationContext() - */ - public void requestSynchronizationContext() { - ++fSynchronizationContextCount; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#releaseSynchronizationContext() - */ - public void releaseSynchronizationContext() { - --fSynchronizationContextCount; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#isSynchronizationContextRequested() - */ - public boolean isSynchronizationContextRequested() { - return fSynchronizationContextCount > 0; - } - - /* - * @see org.eclipse.core.filebuffers.IFileBuffer#isCommitable() - */ - public boolean isCommitable() { - IFileInfo info = fFileStore.fetchInfo(); - return info.exists() && !info.getAttribute(EFS.ATTRIBUTE_READ_ONLY); - } - - /* - * @see org.eclipse.core.filebuffers.IStateValidationSupport#validationStateChanged(boolean, org.eclipse.core.runtime.IStatus) - */ - public void validationStateChanged(boolean validationState, IStatus status) { - // nop - } -} diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java deleted file mode 100644 index b8eacee9510..00000000000 --- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java +++ /dev/null @@ -1,659 +0,0 @@ -/** - * ***************************************************************************** Copyright (c) 2007, - * 2013 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 http://www.eclipse.org/legal/epl-v10.html - * - *
Contributors: IBM Corporation - initial API and implementation James Blackburn
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import java.text.MessageFormat;
-
-/**
- * A number of routines used for string externalization.
- *
- * @since 3.1
- */
-public class NLSUtility {
-
- /**
- * Formats the given string with the given argument.
- *
- * @param message the message to format, must not be Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.BadPartitioningException;
-import org.eclipse.jface.text.BadPositionCategoryException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentRewriteSession;
-import org.eclipse.jface.text.DocumentRewriteSessionType;
-import org.eclipse.jface.text.IDocumentExtension4;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ISynchronizable;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Position;
-
-/**
- * Document that can be synchronized with a lock object.
- *
- * Initially no locking takes place.
- *
- * @since 3.2
- */
-public class SynchronizableDocument extends Document implements ISynchronizable {
-
- private Object fLockObject;
-
- /*
- * @see org.eclipse.jface.text.ISynchronizable#setLockObject(java.lang.Object)
- */
- public synchronized void setLockObject(Object lockObject) {
- fLockObject = lockObject;
- }
-
- /*
- * @see org.eclipse.jface.text.ISynchronizable#getLockObject()
- */
- public synchronized Object getLockObject() {
- return fLockObject;
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.1, replaced by {@link
- * IDocumentExtension4#startRewriteSession(DocumentRewriteSessionType)}
- */
- public void startSequentialRewrite(boolean normalized) {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.startSequentialRewrite(normalized);
- return;
- }
- synchronized (lockObject) {
- super.startSequentialRewrite(normalized);
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.1, replaced by {@link
- * IDocumentExtension4#stopRewriteSession(DocumentRewriteSession)}
- */
- public void stopSequentialRewrite() {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.stopSequentialRewrite();
- return;
- }
- synchronized (lockObject) {
- super.stopSequentialRewrite();
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#startRewriteSession(org.eclipse.jface.text.DocumentRewriteSessionType)
- *
- * @since 3.5
- */
- public DocumentRewriteSession startRewriteSession(DocumentRewriteSessionType sessionType) {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.startRewriteSession(sessionType);
- }
- synchronized (lockObject) {
- return super.startRewriteSession(sessionType);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#stopRewriteSession(org.eclipse.jface.text.DocumentRewriteSession)
- *
- * @since 3.5
- */
- public void stopRewriteSession(DocumentRewriteSession session) {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.stopRewriteSession(session);
- return;
- }
- synchronized (lockObject) {
- super.stopRewriteSession(session);
- }
- }
-
- /*
- * @see IDocument#get()
- */
- public String get() {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.get();
- }
- synchronized (lockObject) {
- return super.get();
- }
- }
-
- /*
- * @see IDocument#get(int, int)
- */
- public String get(int offset, int length) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.get(offset, length);
- }
- synchronized (lockObject) {
- return super.get(offset, length);
- }
- }
-
- /*
- * @see IDocument#getChar(int)
- */
- public char getChar(int offset) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getChar(offset);
- }
- synchronized (lockObject) {
- return super.getChar(offset);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.IDocumentExtension4#getModificationStamp()
- * @since 3.1
- */
- public long getModificationStamp() {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getModificationStamp();
- }
- synchronized (lockObject) {
- return super.getModificationStamp();
- }
- }
-
- /*
- * @see IDocument#replace(int, int, String)
- */
- public void replace(int offset, int length, String text) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.replace(offset, length, text);
- return;
- }
- synchronized (lockObject) {
- super.replace(offset, length, text);
- }
- }
-
- /*
- * @see IDocumentExtension4#replace(int, int, String, long)
- */
- public void replace(int offset, int length, String text, long modificationStamp)
- throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.replace(offset, length, text, modificationStamp);
- return;
- }
- synchronized (lockObject) {
- super.replace(offset, length, text, modificationStamp);
- }
- }
-
- /*
- * @see IDocument#set(String)
- */
- public void set(String text) {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.set(text);
- return;
- }
- synchronized (lockObject) {
- super.set(text);
- }
- }
-
- /*
- * @see IDocumentExtension4#set(String, long)
- */
- public void set(String text, long modificationStamp) {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.set(text, modificationStamp);
- return;
- }
- synchronized (lockObject) {
- super.set(text, modificationStamp);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#addPosition(java.lang.String, org.eclipse.jface.text.Position)
- */
- public void addPosition(String category, Position position)
- throws BadLocationException, BadPositionCategoryException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.addPosition(category, position);
- return;
- }
- synchronized (lockObject) {
- super.addPosition(category, position);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#removePosition(java.lang.String, org.eclipse.jface.text.Position)
- */
- public void removePosition(String category, Position position)
- throws BadPositionCategoryException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- super.removePosition(category, position);
- return;
- }
- synchronized (lockObject) {
- super.removePosition(category, position);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getPositions(java.lang.String)
- */
- public Position[] getPositions(String category) throws BadPositionCategoryException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getPositions(category);
- }
- synchronized (lockObject) {
- return super.getPositions(category);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getPositions(java.lang.String, int, int, boolean, boolean)
- * @since 3.4
- */
- public Position[] getPositions(
- String category, int offset, int length, boolean canStartBefore, boolean canEndAfter)
- throws BadPositionCategoryException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getPositions(category, offset, length, canStartBefore, canEndAfter);
- }
- synchronized (lockObject) {
- return super.getPositions(category, offset, length, canStartBefore, canEndAfter);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#computePartitioning(java.lang.String, int, int, boolean)
- *
- * @since 3.5
- */
- public ITypedRegion[] computePartitioning(
- String partitioning, int offset, int length, boolean includeZeroLengthPartitions)
- throws BadLocationException, BadPartitioningException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.computePartitioning(partitioning, offset, length, includeZeroLengthPartitions);
- }
- synchronized (lockObject) {
- return super.computePartitioning(partitioning, offset, length, includeZeroLengthPartitions);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getLineDelimiter(int)
- *
- * @since 3.5
- */
- public String getLineDelimiter(int line) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getLineDelimiter(line);
- }
- synchronized (lockObject) {
- return super.getLineDelimiter(line);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getDefaultLineDelimiter()
- *
- * @since 3.5
- */
- public String getDefaultLineDelimiter() {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getDefaultLineDelimiter();
- }
- synchronized (lockObject) {
- return super.getDefaultLineDelimiter();
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getLineInformation(int)
- *
- * @since 3.5
- */
- public IRegion getLineInformation(int line) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getLineInformation(line);
- }
- synchronized (lockObject) {
- return super.getLineInformation(line);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getLineInformationOfOffset(int)
- *
- * @since 3.5
- */
- public IRegion getLineInformationOfOffset(int offset) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getLineInformationOfOffset(offset);
- }
- synchronized (lockObject) {
- return super.getLineInformationOfOffset(offset);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getLineLength(int)
- *
- * @since 3.5
- */
- public int getLineLength(int line) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getLineLength(line);
- }
- synchronized (lockObject) {
- return super.getLineLength(line);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getLineOffset(int)
- *
- * @since 3.5
- */
- public int getLineOffset(int line) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getLineOffset(line);
- }
- synchronized (lockObject) {
- return super.getLineOffset(line);
- }
- }
-
- /*
- * @see org.eclipse.jface.text.AbstractDocument#getLineOfOffset(int)
- *
- * @since 3.5
- */
- public int getLineOfOffset(int pos) throws BadLocationException {
- Object lockObject = getLockObject();
- if (lockObject == null) {
- return super.getLineOfOffset(pos);
- }
- synchronized (lockObject) {
- return super.getLineOfOffset(pos);
- }
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java
deleted file mode 100644
index 97973d0cb92..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java
+++ /dev/null
@@ -1,852 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2012 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation Andrew Ferguson (Symbian) -
- * [api] enable document setup participants to customize behavior based on resource being opened -
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=208881
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filebuffers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.filebuffers.IFileBuffer;
-import org.eclipse.core.filebuffers.IFileBufferListener;
-import org.eclipse.core.filebuffers.IFileBufferStatusCodes;
-import org.eclipse.core.filebuffers.ISynchronizationContext;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.filebuffers.LocationKind;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension4;
-
-/** @since 3.0 */
-public class TextFileBufferManager implements ITextFileBufferManager {
-
- private abstract static class SafeNotifier implements ISafeRunnable {
- public void handleException(Throwable ex) {
- // NOTE: Logging is done by SafeRunner
- }
- }
-
- // protected static final IContentType TEXT_CONTENT_TYPE=
- // Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT);
-
- private Map fFilesBuffers = new HashMap();
- private Map fFileStoreFileBuffers = new HashMap();
- private List fFileBufferListeners = new ArrayList();
- protected ExtensionsRegistry fRegistry;
- private ISynchronizationContext fSynchronizationContext;
-
- public TextFileBufferManager() {
- fRegistry = new ExtensionsRegistry();
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.3, replaced by {@link #connect(IPath, LocationKind, IProgressMonitor)}
- */
- public void connect(IPath location, IProgressMonitor monitor) throws CoreException {
- connect(location, LocationKind.NORMALIZE, monitor);
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#connect(org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.IFileBufferManager.LocationKind, org.eclipse.core.runtime.IProgressMonitor)
- * @since 3.3
- */
- public void connect(IPath location, LocationKind locationKind, IProgressMonitor monitor)
- throws CoreException {
- Assert.isNotNull(location);
- if (locationKind == LocationKind.NORMALIZE) location = normalizeLocation(location);
-
- AbstractFileBuffer fileBuffer = null;
- synchronized (fFilesBuffers) {
- fileBuffer = internalGetFileBuffer(location);
- if (fileBuffer != null) {
- fileBuffer.connect();
- return;
- }
- }
-
- fileBuffer = createFileBuffer(location, locationKind);
- if (fileBuffer == null)
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- FileBuffersPlugin.PLUGIN_ID,
- IFileBufferStatusCodes.CREATION_FAILED,
- FileBuffersMessages.FileBufferManager_error_canNotCreateFilebuffer,
- null));
-
- fileBuffer.create(location, monitor);
-
- synchronized (fFilesBuffers) {
- AbstractFileBuffer oldFileBuffer = internalGetFileBuffer(location);
- if (oldFileBuffer != null) {
- fileBuffer.disconnect();
- fileBuffer.dispose();
- oldFileBuffer.connect();
- return;
- }
- fileBuffer.connect();
- fFilesBuffers.put(location, fileBuffer);
- }
-
- // Do notification outside synchronized block
- fireBufferCreated(fileBuffer);
- }
-
- /*
- // * @see org.eclipse.core.filebuffers.IFileBufferManager#connectFileStore(org.eclipse.core.filesystem.IFileStore, org.eclipse.core.runtime.IProgressMonitor)
- // * @since 3.3
- // */
- // public void connectFileStore(IFileStore fileStore, IProgressMonitor monitor) throws
- // CoreException {
- // Assert.isLegal(fileStore != null);
- //
- // FileStoreFileBuffer fileBuffer= null;
- // synchronized (fFileStoreFileBuffers) {
- // fileBuffer= internalGetFileBuffer(fileStore);
- // if (fileBuffer != null) {
- // fileBuffer.connect();
- // return;
- // }
- // }
- //
- // fileBuffer= createFileBuffer(fileStore);
- // if (fileBuffer == null)
- // throw new CoreException(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID,
- // IFileBufferStatusCodes.CREATION_FAILED,
- // FileBuffersMessages.FileBufferManager_error_canNotCreateFilebuffer, null));
- //
- // fileBuffer.create(fileStore, monitor);
- //
- // synchronized (fFileStoreFileBuffers) {
- // AbstractFileBuffer oldFileBuffer= internalGetFileBuffer(fileStore);
- // if (oldFileBuffer != null) {
- // fileBuffer.disconnect();
- // fileBuffer.dispose();
- // oldFileBuffer.connect();
- // return;
- // }
- // fileBuffer.connect();
- // fFileStoreFileBuffers.put(fileStore, fileBuffer);
- // }
- //
- // // Do notification outside synchronized block
- // fireBufferCreated(fileBuffer);
- // }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.3, replaced by {@link #disconnect(IPath, LocationKind, IProgressMonitor)}
- */
- public void disconnect(IPath location, IProgressMonitor monitor) throws CoreException {
- disconnect(location, LocationKind.NORMALIZE, monitor);
- }
-
- /*
- * @since 3.3
- */
- protected IPath normalizeLocation(IPath location) {
- return location;
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#disconnect(org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.IFileBufferManager.LocationKind, org.eclipse.core.runtime.IProgressMonitor)
- * @since 3.3
- */
- public void disconnect(IPath location, LocationKind locationKind, IProgressMonitor monitor)
- throws CoreException {
- Assert.isNotNull(location);
- if (locationKind == LocationKind.NORMALIZE) location = normalizeLocation(location);
-
- AbstractFileBuffer fileBuffer;
- synchronized (fFilesBuffers) {
- fileBuffer = internalGetFileBuffer(location);
- if (fileBuffer == null) return;
-
- fileBuffer.disconnect();
- if (!fileBuffer.isDisconnected()) return;
-
- fFilesBuffers.remove(location);
- }
-
- // Do notification outside synchronized block
- fireBufferDisposed(fileBuffer);
- fileBuffer.dispose();
- }
-
- // /*
- // * @see
- // org.eclipse.core.filebuffers.IFileBufferManager#disconnectFileStore(org.eclipse.core.filesystem.IFileStore, org.eclipse.core.runtime.IProgressMonitor)
- // * @since 3.3
- // */
- // public void disconnectFileStore(IFileStore fileStore, IProgressMonitor monitor) throws
- // CoreException {
- // Assert.isLegal(fileStore != null);
- //
- // AbstractFileBuffer fileBuffer;
- // synchronized (fFileStoreFileBuffers) {
- // fileBuffer= internalGetFileBuffer(fileStore);
- // if (fileBuffer == null)
- // return;
- //
- // fileBuffer.disconnect();
- // if (!fileBuffer.isDisconnected())
- // return;
- //
- // fFileStoreFileBuffers.remove(fileStore);
- // }
- //
- // // Do notification outside synchronized block
- // fireBufferDisposed(fileBuffer);
- // fileBuffer.dispose();
- // }
-
- // /**
- // * {@inheritDoc}
- // *
- // * @deprecated As of 3.2, replaced by {@link #isTextFileLocation(IPath, boolean)}
- // */
- // public boolean isTextFileLocation(IPath location) {
- // return isTextFileLocation(location, false);
- // }
- //
- // /**
- // * Returns whether a file store at the given location is or can be considered a
- // * text file. If the file store exists, the concrete content type of the file store is
- // * checked. If the concrete content type for the existing file store can not be
- // * determined, this method returns
- // * The provided location is either a full path of a workspace resource or an
- // * absolute path in the local file system. The file buffer manager does not
- // * resolve the location of workspace resources in the case of linked
- // * resources.
- // * Contributors: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) -
- * [170317] add symbolic link support to API
- * *****************************************************************************
- */
-package org.eclipse.core.filesystem;
-
-import java.io.File;
-import java.net.URI;
-import org.eclipse.core.internal.filesystem.LocalFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This class is the main entry point for clients of the Eclipse file system API. This class has
- * factory methods for obtaining instances of file systems and file stores, and provides constants
- * for option values and error codes.
- *
- * @since org.eclipse.core.filesystem 1.0
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class EFS {
-
- /**
- * The unique identifier constant (value " If this attribute is Symbolic links are handled transparently, as implemented by the underlying operating system.
- * This means, that all other attributes of a {@link IFileInfo} apply to the link target instead
- * of the link. Reading or writing a file, or changing attributes applies to the link target and
- * not the link itself. In case a symbolic link points to another symbolic link, the chain of
- * links is transparently followed and operations apply to the actual file or directory being
- * referenced by the chain of symbolic links.
- *
- * Broken symbolic links (which do not reference any valid file or directory) are being
- * returned by {@link IFileStore#childInfos(int, IProgressMonitor)}, but {@link
- * IFileInfo#exists()} returns Note that setting the link target attribute does not cause a symbolic link to be created, or
- * changed to link to a different file. Rather, this attribute is set by file system
- * implementations based on the current state of a link.
- *
- * @see IFileInfo#getStringAttribute(int)
- * @see FileInfo#setStringAttribute(int, String)
- * @see #ATTRIBUTE_SYMLINK
- * @since org.eclipse.core.filesystem 1.1
- */
- public static final int ATTRIBUTE_LINK_TARGET = 1 << 6;
-
- /**
- * Scheme constant (value "file") indicating the local file system scheme.
- *
- * @see EFS#getLocalFileSystem()
- */
- public static final String SCHEME_FILE = "file"; // $NON-NLS-1$
-
- /**
- * Scheme constant (value "null") indicating the null file system scheme.
- *
- * @see EFS#getNullFileSystem()
- */
- public static final String SCHEME_NULL = "null"; // $NON-NLS-1$
-
- /*
- * Status code definitions
- */
- // Errors [266-298]
- /**
- * Status code constant (value 268) indicating a store unexpectedly exists on the file system.
- * Severity: error. Category: file system.
- */
- public static final int ERROR_EXISTS = 268;
-
- /**
- * Status code constant (value 269) indicating a store unexpectedly does not exist on the file
- * system. Severity: error. Category: file system.
- */
- public static final int ERROR_NOT_EXISTS = 269;
-
- /**
- * Status code constant (value 270) indicating the file system location for a store could not be
- * computed. Severity: error. Category: file system.
- */
- public static final int ERROR_NO_LOCATION = 270;
-
- /**
- * Status code constant (value 271) indicating an error occurred while reading from the file
- * system. Severity: error. Category: file system.
- */
- public static final int ERROR_READ = 271;
-
- /**
- * Status code constant (value 272) indicating an error occurred while writing to the file system.
- * Severity: error. Category: file system.
- */
- public static final int ERROR_WRITE = 272;
-
- /**
- * Status code constant (value 273) indicating an error occurred while deleting from the file
- * system. Severity: error. Category: file system.
- */
- public static final int ERROR_DELETE = 273;
-
- /**
- * Status code constant (value 275) indicating this file system is not case sensitive and a file
- * that differs only in case unexpectedly exists on the file system. Severity: error. Category:
- * file system.
- */
- public static final int ERROR_CASE_VARIANT_EXISTS = 275;
-
- /**
- * Status code constant (value 276) indicating a file exists in the file system but is not of the
- * expected type (file instead of directory, or vice-versa). Severity: error. Category: file
- * system.
- */
- public static final int ERROR_WRONG_TYPE = 276;
-
- /**
- * Status code constant (value 277) indicating that the parent file in the file system is marked
- * as read-only. Severity: error. Category: file system.
- */
- public static final int ERROR_PARENT_READ_ONLY = 277;
-
- /**
- * Status code constant (value 279) indicating that the file in the file system is marked as
- * read-only. Severity: error. Category: file system.
- */
- public static final int ERROR_READ_ONLY = 279;
-
- /**
- * Status code constant (value 280) indicating that the file system failed to authenticate the
- * request. This can be caused by missing or incorrect authentication information being supplied.
- * Severity: error. Category: file system.
- *
- * @since 1.4
- */
- public static final int ERROR_AUTH_FAILED = 280;
-
- /**
- * Status code constant (value 566) indicating an internal error has occurred. Severity: error.
- * Category: internal.
- */
- public static final int ERROR_INTERNAL = 566;
-
- private static String WS_PATH;
-
- // /**
- // * Creates an empty file information object. The resulting information
- // * will represent a non-existent file with no name and no attributes set.
- // *
- // * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- // * @return an empty file information object.
- // */
- // public static IFileInfo createFileInfo() {
- // return new FileInfo();
- // }
-
- // /**
- // * Returns a file system corresponding to the given scheme.
- // *
- // * @param scheme The file system URI scheme
- // * @return The corresponding file system for the given scheme
- // * @exception CoreException if this method fails. Reasons include:
- // *
- // * Basic handle-based queries can be performed on the null file system, but all
- // * operations that actually require file system access will fail.
- // *
- // * @return The null file system
- // */
- // public static IFileSystem getNullFileSystem() {
- // return InternalFileSystemCore.getInstance().getNullFileSystem();
- // }
-
- /**
- * Returns the file store corresponding to the provided URI.
- *
- * @param uri The URI of the file store to return
- * @return The file store
- * @exception CoreException if this method fails. Reasons include:
- * Contributors: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) -
- * [170317] add symbolic link support to API
- * *****************************************************************************
- */
-package org.eclipse.core.filesystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A file info is a simple structure holding information about a file or directory. The information
- * contained here is static; changes to this object will not cause corresponding changes to any file
- * on disk, and changes to files on disk are not reflected in this object. At best, an IFileInfo
- * represents a snapshot of the state of a file at a particular moment in time.
- *
- * @see IFileStore#fetchInfo(int, IProgressMonitor)
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @since org.eclipse.core.filesystem 1.0
- * @noimplement This interface is not intended to be implemented by clients. File store
- * implementations should use the concrete class {@link
- * org.eclipse.core.filesystem.provider.FileStore}
- */
-public interface IFileInfo extends Comparable, Cloneable {
- /**
- * The constant indicating that file information was retrieved successfully.
- *
- * @since 1.4
- */
- public static final int NONE = 0;
- /**
- * The constant indicating that an I/O error was encountered while retrieving file information.
- *
- * @since 1.4
- */
- public static final int IO_ERROR = 5; // The value is chosen to match EIO Linux errno value.
-
- /**
- * Returns whether this file or directory exists.
- *
- * @return The time is represented as the number of Universal Time (UT) milliseconds since the epoch
- * (00:00:00 GMT, January 1, 1970).
- *
- * @return the last modified time for this file, or {@link EFS#NONE}
- */
- public abstract long getLastModified();
-
- /**
- * Returns the length of this file, or {@link EFS#NONE} if the file does not exist, or the length
- * could not be computed. For directories, the return value is unspecified.
- *
- * @return the length of this file, or {@link EFS#NONE}
- */
- public abstract long getLength();
-
- /**
- * Returns the name of this file.
- *
- * @return the name of this file.
- */
- public abstract String getName();
-
- /**
- * Returns whether this file is a directory, or Users must call {@link IFileStore#putInfo(IFileInfo, int, IProgressMonitor)} before changes
- * made to this info take effect in an underlying file.
- *
- * @param attribute The attribute to set the value for
- * @param value the value of the specified attribute for this file.
- * @see IFileSystem#attributes()
- */
- public abstract void setAttribute(int attribute, boolean value);
-
- /**
- * Sets the last modified time for this file. A value of {@link EFS#NONE} indicates the file does
- * not exist or the last modified time could not be computed.
- *
- * Users must call {@link IFileStore#putInfo(IFileInfo, int, IProgressMonitor)} before changes
- * made to this info take effect in an underlying file.
- *
- * @param time the last modified time for this file, or {@link EFS#NONE}
- */
- public abstract void setLastModified(long time);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileStore.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileStore.java
deleted file mode 100644
index c2c7968ad99..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileStore.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) -
- * [170317] add symbolic link support to API
- * *****************************************************************************
- */
-package org.eclipse.core.filesystem;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A file store is responsible for storage and retrieval of a single file in some file system. The
- * actual protocols and media used for communicating with the file system are abstracted away by
- * this interface, apart from the store's ability to represent itself as a hierarchical {@link URI}.
- *
- * File store instances are lightweight handle objects; a store knows how to access and store
- * file information, but does not retain a large memory footprint or operating system connections
- * such as sockets or file handles. The presence of a file store instance does not imply the
- * existence of a corresponding file in the file system represented by that store. A store that has
- * a corresponding file in its file system is said to exist.
- *
- * As much as possible, implementations of this API maintain the characteristics of the
- * underlying file system represented by this store. For example, store instances will be
- * case-sensitive and case-preserving only when representing case-sensitive and case-preserving file
- * systems.
- *
- * @since org.eclipse.core.filesystem 1.0
- * @noimplement This interface is not intended to be implemented by clients. File store
- * implementations must subclass {@link FileStore} rather than implementing this interface
- * directly.
- */
-public interface IFileStore extends IAdaptable {
-
- /**
- * Returns an {@link IFileInfo} instance for each file and directory contained within this store.
- *
- * @param options bit-wise or of option flag constants (currently only {@link EFS#NONE} is
- * applicable).
- * @param monitor a progress monitor, or The {@link EFS#OVERWRITE} option flag indicates how this method deals with files that
- * already exist at the copy destination. If the Copying a file into a directory of the same name or vice versa always throws a The {@link EFS#SHALLOW} option flag indicates how this method deals with copying of
- * directories. If the In case of a recursive directory copy exception throwing may be deferred. Part of the copy
- * task may be executed without rollback until the exception occurs. The order of copy operations
- * is not specified.
- *
- * @param destination The destination of the copy.
- * @param options bit-wise or of option flag constants ( {@link EFS#OVERWRITE} or {@link
- * EFS#SHALLOW}).
- * @param monitor a progress monitor, or Deletion occurs with best-effort semantics; if some files cannot be deleted, exceptions are
- * recorded but other files will continue to be deleted if possible.
- *
- * Deletion of a file with attribute {@link EFS#ATTRIBUTE_SYMLINK} will always delete the link,
- * rather than the target of the link.
- *
- * @param options bit-wise or of option flag constants (currently only {@link EFS#NONE} is
- * applicable).
- * @param monitor a progress monitor, or This is a convenience method, similar to: This method succeeds regardless of whether a corresponding file currently exists in the
- * underlying file system. In the case of a non-existent file, the returned info will include the
- * file's name and will return This is a handle-only method; a child is provided regardless of whether this store or the
- * child store exists, or whether this store represents a directory or not.
- *
- * The provided path must not contain segments that are self references (".") or parent
- * references ("..").
- *
- * @param path The path of the child store to return
- * @return A child file store.
- * @deprecated use {@link #getFileStore(IPath)} instead
- */
- public IFileStore getChild(IPath path);
-
- /**
- * Returns a handle to the member store identified by the given path. The path is treated as
- * relative to this store.
- *
- * This is a handle-only method; a store is provided regardless of whether this store or the
- * member store exists, or whether this store represents a directory or not.
- *
- * @param path the path of the member store
- * @return the member store
- * @since org.eclipse.core.filesystem 1.2
- */
- public IFileStore getFileStore(IPath path);
-
- /**
- * Returns a child store with the provided name whose parent is this store. This is a handle-only
- * method; a child is provided regardless of whether this store or the child store exists, or
- * whether this store represents a directory or not.
- *
- * @param name The name of the child store to return
- * @return A child file store.
- */
- public IFileStore getChild(String name);
-
- // /**
- // * Returns the file system this store belongs to.
- // *
- // * @return The file system this store belongs to.
- // */
- // public IFileSystem getFileSystem();
-
- /**
- * Returns the name of this store. This is a handle-only method; the name is returned regardless
- * of whether this store exists.
- *
- * Note that when dealing with case-insensitive file systems, this name may differ in case from
- * the name of the corresponding file in the file system. To obtain the exact name used in the
- * file system, use This is a handle only method; this test works regardless of whether this store or the
- * parameter store exists.
- *
- * @param other The store to test for parentage.
- * @return The {@link EFS#SHALLOW} option flag indicates how this method deals with creation when the
- * parent directory does not exist. If the The {@link EFS#OVERWRITE} option flag indicates how this method deals with files that
- * already exist at the move destination. If the The returned stream is not guaranteed to be buffered efficiently. When reading large blocks
- * of data from the stream, a It depends on the implementation how the limit of concurrently opened streams is handled.
- * The returned stream is not guaranteed to be buffered efficiently. When writing large blocks
- * of data to the stream, a It depends on the implementation how the limit of concurrently opened streams is handled.
- * The {@link EFS#APPEND} update flag controls where output is written to the file. If this
- * flag is specified, content written to the stream will be appended to the end of the file. If
- * this flag is not specified, the contents of the existing file, if any, is truncated to zero and
- * the new output will be written from the start of the file.
- *
- * @param options bit-wise or of option flag constants ( {@link EFS#APPEND}).
- * @param monitor a progress monitor, or The {@link EFS#SET_ATTRIBUTES} update flag controls whether the file's attributes are
- * changed. When this flag is specified, the Since Eclipse 3.6, implementations shall also make a best effort to consult UNIX umask in
- * order to set the same attributes for other access groups. This setting of attributes for others
- * may change the file system state even if an attribute appears to be set for the current user
- * already.
- *
- * Clearing an attribute causes clearing it for all access groups. This means setting and
- * clearing an attribute might not restore previous file system state as these operations are not
- * symmetrical.
- *
- * The {@link EFS#SET_LAST_MODIFIED} update flag controls whether the file's last modified time
- * is changed. When this flag is specified, the last modified time for the file in the underlying
- * file system is updated to the value in the provided info object. Due to the different
- * granularities of file systems, the time that is set might not exact match the provided time.
- *
- * @param info The file information instance containing the values to set.
- * @param options bit-wise or of option flag constants ( {@link EFS#SET_ATTRIBUTES} or {@link
- * EFS#SET_LAST_MODIFIED}).
- * @param monitor a progress monitor, or The {@link EFS#CACHE} option flag indicates whether this method should return the actual
- * underlying file or a cached local copy. When the {@link EFS#CACHE} flag is specified, this
- * method will return a cached local file with the same state and contents as this file. When the
- * {@link EFS#CACHE} flag is not specified, this method will return the actual underlying local
- * file, or In the case of a cached file, the returned file is intended to be used for read operations
- * only. No guarantee is made about synchronization between the returned file and this store. If
- * the cached file is modified in any way, those changes may not be reflected in this store, but
- * may affect other callers who are using the local representation of this store.
- *
- * While the implementation of this method may use caching to return the same result for
- * multiple calls to this method, it is guaranteed that the returned file will reflect the state
- * of this file store at the time of this call. As such, this method will always contact the
- * backing file system of this store, either to validate cache consistency or to fetch new
- * contents.
- *
- * The caller is not responsible for deleting this file when they are done with using it. If
- * the returned file is a cached copy, it will be deleted automatically at the end of this session
- * (Eclipse shutdown or virtual machine exit).
- *
- * @param options bit-wise or of option flag constants ( only {@link EFS#CACHE} applies).
- * @param monitor a progress monitor, or Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.filesystem;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This is the main interface to a single file system. Each file system instance manages interaction
- * with all files in the backing store represented by a particular URI scheme.
- *
- * File systems are registered using the "filesystems" extension point.
- *
- * @see EFS#getFileSystem(String)
- * @since org.eclipse.core.filesystem 1.0
- * @noimplement This interface is not intended to be implemented by clients. File system
- * implementations must subclass {@link FileSystem} rather than implementing this interface
- * directly.
- */
-public interface IFileSystem extends IAdaptable {
-
- /**
- * Returns the file attributes supported by this file system. This value is a bit mask of the
- *
- // * A file tree accurately represents the state of a portion of a file system
- // * at the time it is created, but it is never updated. Clients using a file
- // * tree must tolerate the fact that the actual file system contents may
- // * change after the tree is generated.
- // * This is a convenience method for file systems that do not make use of the authority {@link
- * URI} component, such as a host or user information. The provided path argument is interpreted
- * as the path component of the file system's {@link URI}. For example, this method can be used to
- * safely navigate within the local file system.
- *
- * @param path A path to a file store within the scheme of this file system.
- * @return A handle to a file store in this file system
- * @see EFS#getLocalFileSystem()
- */
- public IFileStore getStore(IPath path);
-
- /**
- * Returns a handle to a file store in this file system. This is a handle-only method; this method
- * succeeds regardless of whether a file exists at that path in this file system. The provided URI
- * must have the appropriate scheme and component parts for the file system on which this method
- * is called.
- *
- * @param uri The URI of the file store to return.
- * @return A handle to a file store in this file system
- */
- public IFileStore getStore(URI uri);
-
- /**
- * Returns whether this file system is case sensitive. A case sensitive file system treats files
- * with names that differ only in case as different files. For example, "HELLO", "Hello", and
- * "hello" would be three different files or directories in a case sensitive file system.
- *
- * @return The Contributors: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) -
- * [170317] add symbolic link support to API
- * *****************************************************************************
- */
-package org.eclipse.core.filesystem.provider;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileInfo;
-
-/**
- * This class should be used by file system providers in their implementation of API methods that
- * return {@link IFileInfo} objects.
- *
- * @since org.eclipse.core.filesystem 1.0
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class FileInfo implements IFileInfo {
- /** Internal attribute indicating if the file is a directory */
- private static final int ATTRIBUTE_DIRECTORY = 1 << 0;
-
- /** Internal attribute indicating if the file exists. */
- private static final int ATTRIBUTE_EXISTS = 1 << 16;
-
- /** Bit field of file attributes. Initialized to specify a writable resource. */
- private int attributes = EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_READ;
-
- private int errorCode = NONE;
-
- /** The last modified time. */
- private long lastModified = EFS.NONE;
-
- /** The file length. */
- private long length = EFS.NONE;
-
- /** The file name. */
- private String name = ""; // $NON-NLS-1$
-
- /** The target file name if this is a symbolic link */
- private String linkTarget = null;
-
- /** Creates a new file information object with default values. */
- public FileInfo() {
- super();
- }
-
- /**
- * Creates a new file information object. All values except the file name will have default
- * values.
- *
- * @param name The name of this file
- */
- public FileInfo(String name) {
- super();
- this.name = name;
- }
-
- /**
- * Convenience method to clear a masked region of the attributes bit field.
- *
- * @param mask The mask to be cleared
- */
- private void clear(int mask) {
- attributes &= ~mask;
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#clone()
- */
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException e) {
- // we know this object is cloneable
- return null;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
- public int compareTo(Object o) {
- return name.compareTo(((FileInfo) o).name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#exists()
- */
- public boolean exists() {
- return getAttribute(ATTRIBUTE_EXISTS);
- }
-
- /**
- * @since 1.4
- * @see IFileInfo#getError()
- */
- public int getError() {
- return errorCode;
- }
-
- public boolean getAttribute(int attribute) {
- if (attribute == EFS.ATTRIBUTE_READ_ONLY && isAttributeSuported(EFS.ATTRIBUTE_OWNER_WRITE))
- return (!isSet(EFS.ATTRIBUTE_OWNER_WRITE)) || isSet(EFS.ATTRIBUTE_IMMUTABLE);
- else if (attribute == EFS.ATTRIBUTE_EXECUTABLE
- && isAttributeSuported(EFS.ATTRIBUTE_OWNER_EXECUTE))
- return isSet(EFS.ATTRIBUTE_OWNER_EXECUTE);
- else return isSet(attribute);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#getStringAttribute(int)
- */
- public String getStringAttribute(int attribute) {
- if (attribute == EFS.ATTRIBUTE_LINK_TARGET) return this.linkTarget;
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#lastModified()
- */
- public long getLastModified() {
- return lastModified;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#length()
- */
- public long getLength() {
- return length;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#getName()
- */
- public String getName() {
- return name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#isDirectory()
- */
- public boolean isDirectory() {
- return isSet(ATTRIBUTE_DIRECTORY);
- }
-
- private boolean isSet(long mask) {
- return (attributes & mask) != 0;
- }
-
- private void set(int mask) {
- attributes |= mask;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#setAttribute(int, boolean)
- */
- public void setAttribute(int attribute, boolean value) {
- if (attribute == EFS.ATTRIBUTE_READ_ONLY && isAttributeSuported(EFS.ATTRIBUTE_OWNER_WRITE)) {
- if (value) {
- clear(EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OTHER_WRITE | EFS.ATTRIBUTE_GROUP_WRITE);
- set(EFS.ATTRIBUTE_IMMUTABLE);
- } else {
- set(EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_READ);
- clear(EFS.ATTRIBUTE_IMMUTABLE);
- }
- } else if (attribute == EFS.ATTRIBUTE_EXECUTABLE
- && isAttributeSuported(EFS.ATTRIBUTE_OWNER_EXECUTE)) {
- if (value) set(EFS.ATTRIBUTE_OWNER_EXECUTE);
- else
- clear(
- EFS.ATTRIBUTE_OWNER_EXECUTE
- | EFS.ATTRIBUTE_GROUP_EXECUTE
- | EFS.ATTRIBUTE_OTHER_EXECUTE);
- } else {
- if (value) set(attribute);
- else clear(attribute);
- }
- }
-
- private static boolean isAttributeSuported(int value) {
- // return (LocalFileNativesManager.getSupportedAttributes() & value) != 0;
- return true;
- }
-
- /**
- * Sets whether this is a file or directory.
- *
- * @param value Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.filesystem.provider;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.internal.filesystem.Messages;
-import org.eclipse.core.internal.filesystem.Policy;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The abstract superclass of all {@link IFileStore} implementations. All file stores must subclass
- * this base class, implementing all abstract methods according to their specification in the {@link
- * IFileStore} API.
- *
- * Clients may subclass this class.
- *
- * @since org.eclipse.core.filesystem 1.0
- */
-public abstract class FileStore /* extends PlatformObject*/ implements IFileStore {
- /**
- * Singleton buffer created to avoid buffer creations in the transferStreams method. Used as an
- * optimization, based on the assumption that multiple writes won't happen in a given instance of
- * FileStore.
- */
- private static final byte[] buffer = new byte[8192];
-
- /**
- * A file info array of size zero that can be used as a return value for methods that return
- * IFileInfo[] to avoid creating garbage objects.
- */
- protected static final IFileInfo[] EMPTY_FILE_INFO_ARRAY = new IFileInfo[0];
-
- /**
- * A string array of size zero that can be used as a return value for methods that return String[]
- * to avoid creating garbage objects.
- */
- protected static final String[] EMPTY_STRING_ARRAY = new String[0];
-
- /**
- * Transfers the contents of an input stream to an output stream, using a large buffer.
- *
- * @param source The input stream to transfer
- * @param destination The destination stream of the transfer
- * @param path A path representing the data being transferred for use in error messages.
- * @param monitor A progress monitor. The monitor is assumed to have already done beginWork with
- * one unit of work allocated per buffer load of contents to be transferred.
- * @throws CoreException
- */
- private static final void transferStreams(
- InputStream source, OutputStream destination, String path, IProgressMonitor monitor)
- throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- /*
- * Note: although synchronizing on the buffer is thread-safe,
- * it may result in slower performance in the future if we want
- * to allow concurrent writes.
- */
- synchronized (buffer) {
- while (true) {
- int bytesRead = -1;
- try {
- bytesRead = source.read(buffer);
- } catch (IOException e) {
- String msg = NLS.bind(Messages.failedReadDuringWrite, path);
- Policy.error(EFS.ERROR_READ, msg, e);
- }
- try {
- if (bytesRead == -1) {
- destination.close();
- break;
- }
- destination.write(buffer, 0, bytesRead);
- } catch (IOException e) {
- String msg = NLS.bind(Messages.couldNotWrite, path);
- Policy.error(EFS.ERROR_WRITE, msg, e);
- }
- monitor.worked(1);
- }
- }
- } finally {
- Policy.safeClose(source);
- Policy.safeClose(destination);
- }
- }
-
- /**
- * The default implementation of {@link IFileStore#childInfos(int, IProgressMonitor)}. Subclasses
- * should override this method where a more efficient implementation is possible. This default
- * implementation calls {@link #fetchInfo()} on each child, which will result in a file system
- * call for each child.
- */
- public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
- IFileStore[] childStores = childStores(options, monitor);
- IFileInfo[] childInfos = new IFileInfo[childStores.length];
- for (int i = 0; i < childStores.length; i++) {
- childInfos[i] = childStores[i].fetchInfo();
- }
- return childInfos;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#childNames(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public abstract String[] childNames(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * The default implementation of {@link IFileStore#childStores(int, IProgressMonitor)}. Subclasses
- * may override.
- */
- public IFileStore[] childStores(int options, IProgressMonitor monitor) throws CoreException {
- String[] children = childNames(options, monitor);
- IFileStore[] wrapped = new IFileStore[children.length];
- for (int i = 0; i < wrapped.length; i++) wrapped[i] = getChild(children[i]);
- return wrapped;
- }
-
- /**
- * The default implementation of {@link IFileStore#copy(IFileStore, int, IProgressMonitor)}. This
- * implementation performs a copy by using other primitive methods. Subclasses may override this
- * method.
- */
- public void copy(IFileStore destination, int options, IProgressMonitor monitor)
- throws CoreException {
- monitor = Policy.monitorFor(monitor);
- Policy.checkCanceled(monitor);
- final IFileInfo sourceInfo = fetchInfo(EFS.NONE, null);
- if (sourceInfo.isDirectory()) copyDirectory(sourceInfo, destination, options, monitor);
- else copyFile(sourceInfo, destination, options, monitor);
- }
-
- /**
- * Recursively copies a directory as specified by {@link IFileStore#copy(IFileStore, int,
- * IProgressMonitor)}.
- *
- * @param sourceInfo The current file information for the source of the move
- * @param destination The destination of the copy.
- * @param options bit-wise or of option flag constants ( {@link EFS#OVERWRITE} or {@link
- * EFS#SHALLOW}).
- * @param monitor a progress monitor, or Implementations of this method are responsible for ensuring that the exact sequence of bytes
- * written to the output stream are returned on a subsequent call to {@link #openInputStream(int,
- * IProgressMonitor)}, unless there have been intervening modifications to the file in the file
- * system. For example, the implementation of this method must not perform conversion of line
- * terminator characters on text data in the stream.
- *
- * @param options bit-wise or of option flag constants
- * @param monitor a progress monitor, or Contributors: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) -
- * [294429] Avoid substring baggage in FileInfo Martin Lippert (VMware) - [394607] Poor performance
- * when using findFilesForLocationURI Sergey Prigogin (Google) - Fix for bug 435519
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filesystem;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.filesystem.provider.FileInfo;
-import org.eclipse.core.filesystem.provider.FileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * File system implementation based on storage of files in the local operating system's file system.
- */
-public class LocalFile extends FileStore {
- /** The java.io.File that this store represents. */
- protected final File file;
- /** The absolute file system path of the file represented by this store. */
- protected final String filePath;
-
- /** cached value for the toURI method */
- private URI uri;
-
- private static int attributes(File aFile) {
- if (!aFile.exists() || aFile.canWrite()) return EFS.NONE;
- return EFS.ATTRIBUTE_READ_ONLY;
- }
-
- /**
- * Creates a new local file.
- *
- * @param file The file this local file represents
- */
- public LocalFile(File file) {
- this.file = file;
- this.filePath = file.getAbsolutePath();
- }
-
- /**
- * This method is called after a failure to modify a file or directory. Check to see if the parent
- * is read-only and if so then throw an exception with a more specific message and error code.
- *
- * @param target The file that we failed to modify
- * @param exception The low level exception that occurred, or Contributors: IBM - Initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filesystem;
-
-import org.eclipse.osgi.util.NLS;
-
-/** Provides translatable messages for the file system bundle */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
- "org.eclipse.core.internal.filesystem.messages"; // $NON-NLS-1$
-
- public static String copying;
- public static String couldnotDelete;
- public static String couldnotDeleteReadOnly;
- public static String couldNotLoadLibrary;
- public static String couldNotMove;
- public static String couldNotRead;
- public static String couldNotWrite;
- public static String deleteProblem;
- public static String deleting;
- public static String failedCreateWrongType;
- public static String failedMove;
- public static String failedReadDuringWrite;
- public static String fileExists;
- public static String fileNotFound;
- public static String moving;
- public static String noFileSystem;
- public static String noImplDelete;
- public static String noImplWrite;
- public static String noScheme;
- public static String notAFile;
- public static String readOnlyParent;
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/Policy.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/Policy.java
deleted file mode 100644
index 80568f8360a..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/Policy.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.filesystem;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Date;
-import org.eclipse.core.internal.runtime.RuntimeLog;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/** Grab bag of utility methods for the file system plugin */
-public class Policy {
- public static final String PI_FILE_SYSTEM = "org.eclipse.core.filesystem"; // $NON-NLS-1$
-
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- }
-
- /**
- * Print a debug message to the console. Pre-pend the message with the current date and the name
- * of the current thread.
- */
- public static void debug(String message) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(new Date(System.currentTimeMillis()));
- buffer.append(" - ["); // $NON-NLS-1$
- buffer.append(Thread.currentThread().getName());
- buffer.append("] "); // $NON-NLS-1$
- buffer.append(message);
- System.out.println(buffer.toString());
- }
-
- public static void error(int code, String message) throws CoreException {
- error(code, message, null);
- }
-
- public static void error(int code, String message, Throwable exception) throws CoreException {
- int severity = code == 0 ? 0 : 1 << (code % 100 / 33);
- throw new CoreException(new Status(severity, PI_FILE_SYSTEM, code, message, exception));
- }
-
- public static void log(int severity, String message, Throwable t) {
- if (message == null) message = ""; // $NON-NLS-1$
- RuntimeLog.log(new Status(severity, PI_FILE_SYSTEM, 1, message, t));
- }
-
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- return monitor == null ? new NullProgressMonitor() : monitor;
- }
-
- /** Closes a stream and ignores any resulting exception. */
- public static void safeClose(InputStream in) {
- try {
- if (in != null) in.close();
- } catch (IOException e) {
- // ignore
- }
- }
-
- /** Closes a stream and ignores any resulting exception. */
- public static void safeClose(OutputStream out) {
- try {
- if (out != null) out.close();
- } catch (IOException e) {
- // ignore
- }
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null) return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor) return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/resources/org/eclipse/core/internal/filesystem/messages.properties b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/resources/org/eclipse/core/internal/filesystem/messages.properties
deleted file mode 100644
index 98aca605c04..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/resources/org/eclipse/core/internal/filesystem/messages.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2010 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-### File store plugin messages.
-
-copying = Copying: {0}.
-couldnotDelete = Could not delete: {0}.
-couldnotDeleteReadOnly = Could not delete read-only file: {0}.
-couldNotLoadLibrary = Could not load library: {0}. This library provides platform-specific optimizations for certain file system operations. This library is not present on all platforms, so this may not be an error. The resources plug-in will safely fall back to using java.io.File functionality.
-couldNotMove = Could not move: {0}.
-couldNotRead = Could not read file: {0}.
-couldNotWrite = Could not write file: {0}.
-deleteProblem = Problems encountered while deleting files.
-deleting = Deleting: {0}.
-failedCreateWrongType=Cannot create file because existing file of wrong type exists: {0}.
-failedMove = Critical failure moving: {0} to: {1}. Content is lost.
-failedReadDuringWrite = Could not read from source when writing file: {0}
-fileExists = File already exists on disk: {0}.
-fileNotFound = File not found: {0}.
-moving = Moving: {0}.
-noFileSystem=No file system is defined for scheme: {0}
-noImplDelete = This file system does not support deletion: {0}.
-noImplWrite = This file system is read only: {0}.
-noScheme=Must specify a URI scheme:
-notAFile = Resource is not a file: {0}.
-readOnlyParent = Parent of resource: {0} is marked as read-only.
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml
deleted file mode 100644
index 855321a9d84..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/pom.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
- Contributors: IBM Corporation - initial API and implementation Martin Oberhuber (Wind River) -
- * [44107] Add symbolic links to ResourceAttributes API James Blackburn (Broadcom Corp.) - ongoing
- * development *****************************************************************************
- */
-package org.eclipse.che.core.internal.resources;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.internal.resources.ResourceException;
-import org.eclipse.core.internal.utils.Messages;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.osgi.util.NLS;
-
-/** Static utility methods for manipulating Files and URIs. */
-public class FileUtil {
- /**
- * Singleton buffer created to prevent buffer creations in the transferStreams method. Used as an
- * optimization, based on the assumption that multiple writes won't happen in a given instance of
- * FileStore.
- */
- private static final byte[] buffer = new byte[8192];
-
- // /**
- // * Converts a ResourceAttributes object into an IFileInfo object.
- // * @param attributes The resource attributes
- // * @return The file info
- // */
- // public static IFileInfo attributesToFileInfo(ResourceAttributes attributes) {
- // IFileInfo fileInfo = EFS.createFileInfo();
- // fileInfo.setAttribute(EFS.ATTRIBUTE_READ_ONLY, attributes.isReadOnly());
- // fileInfo.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, attributes.isExecutable());
- // fileInfo.setAttribute(EFS.ATTRIBUTE_ARCHIVE, attributes.isArchive());
- // fileInfo.setAttribute(EFS.ATTRIBUTE_HIDDEN, attributes.isHidden());
- // fileInfo.setAttribute(EFS.ATTRIBUTE_SYMLINK, attributes.isSymbolicLink());
- // fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_READ, attributes.isSet(EFS.ATTRIBUTE_GROUP_READ));
- // fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, attributes.isSet(EFS.ATTRIBUTE_GROUP_WRITE));
- // fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE,
- // attributes.isSet(EFS.ATTRIBUTE_GROUP_EXECUTE));
- // fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_READ, attributes.isSet(EFS.ATTRIBUTE_OTHER_READ));
- // fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, attributes.isSet(EFS.ATTRIBUTE_OTHER_WRITE));
- // fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE,
- // attributes.isSet(EFS.ATTRIBUTE_OTHER_EXECUTE));
- // return fileInfo;
- // }
-
- /** Converts an IPath into its canonical form for the local file system. */
- public static IPath canonicalPath(IPath path) {
- if (path == null) return null;
- try {
- final String pathString = path.toOSString();
- final String canonicalPath = new java.io.File(pathString).getCanonicalPath();
- // only create a new path if necessary
- if (canonicalPath.equals(pathString)) return path;
- return new Path(canonicalPath);
- } catch (IOException e) {
- return path;
- }
- }
-
- /** Converts a URI into its canonical form. */
- public static URI canonicalURI(URI uri) {
- if (uri == null) return null;
- if (EFS.SCHEME_FILE.equals(uri.getScheme())) {
- // only create a new URI if it is different
- final IPath inputPath = URIUtil.toPath(uri);
- final IPath canonicalPath = canonicalPath(inputPath);
- if (inputPath == canonicalPath) return uri;
- return URIUtil.toURI(canonicalPath);
- }
- return uri;
- }
-
- /**
- * Returns true if the given file system locations overlap. If "bothDirections" is true, this
- * means they are the same, or one is a proper prefix of the other. If "bothDirections" is false,
- * this method only returns true if the locations are the same, or the first location is a prefix
- * of the second. Returns false if the locations do not overlap Does the right thing with respect
- * to case insensitive platforms.
- */
- private static boolean computeOverlap(IPath location1, IPath location2, boolean bothDirections) {
- IPath one = location1;
- IPath two = location2;
- // If we are on a case-insensitive file system then convert to all lower case.
- if (!Workspace.caseSensitive) {
- one = new Path(location1.toOSString().toLowerCase());
- two = new Path(location2.toOSString().toLowerCase());
- }
- return one.isPrefixOf(two) || (bothDirections && two.isPrefixOf(one));
- }
-
- // /**
- // * Returns true if the given file system locations overlap. If "bothDirections" is true,
- // * this means they are the same, or one is a proper prefix of the other. If "bothDirections"
- // * is false, this method only returns true if the locations are the same, or the first location
- // * is a prefix of the second. Returns false if the locations do not overlap
- // */
- // private static boolean computeOverlap(URI location1, URI location2, boolean bothDirections) {
- // if (location1.equals(location2))
- // return true;
- // String scheme1 = location1.getScheme();
- // String scheme2 = location2.getScheme();
- // if (scheme1 == null ? scheme2 != null : !scheme1.equals(scheme2))
- // return false;
- // if (EFS.SCHEME_FILE.equals(scheme1) && EFS.SCHEME_FILE.equals(scheme2))
- // return computeOverlap(URIUtil.toPath(location1), URIUtil.toPath(location2), bothDirections);
- // IFileSystem system = null;
- // try {
- // system = EFS.getFileSystem(scheme1);
- // } catch (CoreException e) {
- // //handled below
- // }
- // if (system == null) {
- // //we are stuck with string comparison
- // String string1 = location1.toString();
- // String string2 = location2.toString();
- // return string1.startsWith(string2) || (bothDirections && string2.startsWith(string1));
- // }
- // IFileStore store1 = system.getStore(location1);
- // IFileStore store2 = system.getStore(location2);
- // return store1.equals(store2) || store1.isParentOf(store2) || (bothDirections &&
- // store2.isParentOf(store1));
- // }
- //
- // /**
- // * Converts an IFileInfo object into a ResourceAttributes object.
- // * @param fileInfo The file info
- // * @return The resource attributes
- // */
- // public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) {
- // ResourceAttributes attributes = new ResourceAttributes();
- // attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
- // attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE));
- // attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
- // attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN));
- // attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK));
- // attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ));
- // attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE));
- // attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE,
- // fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE));
- // attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ));
- // attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE));
- // attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE,
- // fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE));
- // return attributes;
- // }
- //
- // private static String getLineSeparatorFromPreferences(Preferences node) {
- // try {
- // // be careful looking up for our node so not to create any nodes as side effect
- // if (node.nodeExists(Platform.PI_RUNTIME))
- // return node.node(Platform.PI_RUNTIME).get(Platform.PREF_LINE_SEPARATOR, null);
- // } catch (BackingStoreException e) {
- // // ignore
- // }
- // return null;
- // }
- //
- // /**
- // * Returns line separator appropriate for the given file. The returned value
- // * will be the first available value from the list below:
- // * WARNING: If the API contract requires notifying clients of I/O problems,
- * then you must explicitly close() output streams outside of safeClose(). Some
- * OutputStreams will defer an IOException from write() to close(). So while the writes may
- * 'succeed', ignoring the IOExcpetion will result in silent data loss.
- *
- * This method should only be used as a fail-safe to ensure resources are not leaked. See also:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=332543
- */
- public static void safeClose(Closeable stream) {
- try {
- if (stream != null) stream.close();
- } catch (IOException e) {
- // ignore
- }
- }
-
- /**
- * Converts a URI to an IPath. Returns null if the URI cannot be represented as an IPath.
- *
- * Note this method differs from URIUtil in its handling of relative URIs as being relative to
- * path variables.
- */
- public static IPath toPath(URI uri) {
- if (uri == null) return null;
- final String scheme = uri.getScheme();
- // null scheme represents path variable
- if (scheme == null || EFS.SCHEME_FILE.equals(scheme))
- return new Path(uri.getSchemeSpecificPart());
- return null;
- }
-
- public static final void transferStreams(
- InputStream source, OutputStream destination, String path, IProgressMonitor monitor)
- throws CoreException {
- // monitor = Policy.monitorFor(monitor);
- try {
- /*
- * Note: although synchronizing on the buffer is thread-safe,
- * it may result in slower performance in the future if we want
- * to allow concurrent writes.
- */
- synchronized (buffer) {
- while (true) {
- int bytesRead = -1;
- try {
- bytesRead = source.read(buffer);
- } catch (IOException e) {
- String msg = NLS.bind(Messages.localstore_failedReadDuringWrite, path);
- throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, new Path(path), msg, e);
- }
- try {
- if (bytesRead == -1) {
- // Bug 332543 - ensure we don't ignore failures on close()
- destination.close();
- break;
- }
- destination.write(buffer, 0, bytesRead);
- } catch (IOException e) {
- String msg = NLS.bind(Messages.localstore_couldNotWrite, path);
- throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL, new Path(path), msg, e);
- }
- // monitor.worked(1);
- }
- }
- } finally {
- safeClose(source);
- safeClose(destination);
- }
- }
-
- /** Not intended for instantiation. */
- private FileUtil() {
- super();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Folder.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Folder.java
deleted file mode 100644
index f536ded6081..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Folder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2012-2018 Red Hat, Inc.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- */
-package org.eclipse.che.core.internal.resources;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/** @author Evgen Vidolob */
-public class Folder extends Container implements IFolder {
-
- protected Folder(IPath path, Workspace workspace) {
- super(path, workspace);
- }
-
- @Override
- public void create(boolean force, boolean local, IProgressMonitor monitor) throws CoreException {
- // funnel all operations to central method
- create((force ? IResource.FORCE : IResource.NONE), local, monitor);
- }
-
- @Override
- public void create(int updateFlags, boolean local, IProgressMonitor monitor)
- throws CoreException {
- workspace.createResource(this, 0);
- }
-
- @Override
- public String getDefaultCharset(boolean b) throws CoreException {
- return "UTF-8";
- }
-
- @Override
- public int getType() {
- return FOLDER;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Project.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Project.java
deleted file mode 100644
index 63d3f4d95d1..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Project.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright (c) 2012-2018 Red Hat, Inc.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- */
-package org.eclipse.che.core.internal.resources;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import org.eclipse.che.api.project.shared.RegisteredProject;
-import org.eclipse.core.resources.IBuildConfiguration;
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentTypeMatcher;
-
-/** @author Evgen Vidolob */
-public class Project extends Container implements IProject {
-
- protected Project(IPath path, Workspace workspace) {
- super(path, workspace);
- }
-
- @Override
- public void build(int i, String s, Map Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.core.internal.resources;
-
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/** */
-public class ResourceStatus extends Status implements IResourceStatus {
- IPath path;
-
- public ResourceStatus(int type, int code, IPath path, String message, Throwable exception) {
- super(type, ResourcesPlugin.PI_RESOURCES, code, message, exception);
- this.path = path;
- }
-
- public ResourceStatus(int code, String message) {
- this(getSeverity(code), code, null, message, null);
- }
-
- public ResourceStatus(int code, IPath path, String message) {
- this(getSeverity(code), code, path, message, null);
- }
-
- public ResourceStatus(int code, IPath path, String message, Throwable exception) {
- this(getSeverity(code), code, path, message, exception);
- }
-
- /** @see IResourceStatus#getPath() */
- public IPath getPath() {
- return path;
- }
-
- protected static int getSeverity(int code) {
- return code == 0 ? 0 : 1 << (code % 100 / 33);
- }
-
- // for debug only
- private String getTypeName() {
- switch (getSeverity()) {
- case IStatus.OK:
- return "OK"; // $NON-NLS-1$
- case IStatus.ERROR:
- return "ERROR"; // $NON-NLS-1$
- case IStatus.INFO:
- return "INFO"; // $NON-NLS-1$
- case IStatus.WARNING:
- return "WARNING"; // $NON-NLS-1$
- default:
- return String.valueOf(getSeverity());
- }
- }
-
- // for debug only
- @Override
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("[type: "); // $NON-NLS-1$
- sb.append(getTypeName());
- sb.append("], [path: "); // $NON-NLS-1$
- sb.append(getPath());
- sb.append("], [message: "); // $NON-NLS-1$
- sb.append(getMessage());
- sb.append("], [plugin: "); // $NON-NLS-1$
- sb.append(getPlugin());
- sb.append("], [exception: "); // $NON-NLS-1$
- sb.append(getException());
- sb.append("]\n"); // $NON-NLS-1$
- return sb.toString();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Rules.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Rules.java
deleted file mode 100644
index facced63197..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Rules.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM - Initial API and implementation James Blackburn (Broadcom Corp.) - ongoing
- * development *****************************************************************************
- */
-package org.eclipse.che.core.internal.resources;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import org.eclipse.core.internal.events.ILifecycleListener;
-import org.eclipse.core.internal.events.LifecycleEvent;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.resources.team.TeamHook;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-
-/**
- * Class for calculating scheduling rules for resource changing operations. This factory delegates
- * to the TeamHook to obtain an appropriate factory for the resource that the operation is proposing
- * to modify.
- */
-class Rules implements IResourceRuleFactory, ILifecycleListener {
- private final ResourceRuleFactory defaultFactory = new ResourceRuleFactory() {
- /**/
- };
- /** Map of project names to the factory for that project. */
- private final Map This class also tracks operation state for each thread that is involved in an operation. This
- * includes prepared and running operation depth, auto-build strategy and cancel state.
- */
-public class WorkManager implements IManager {
- /**
- * Scheduling rule for use during resource change notification. This rule must always be allowed
- * to nest within a resource rule of any granularity since it is used from within the scope of all
- * resource changing operations. The purpose of this rule is two-fold: 1. To prevent other
- * resource changing jobs from being scheduled while the notification is running 2. To cause an
- * exception if a resource change listener tries to begin a resource rule during a notification.
- * This also prevents deadlock, because the notification thread owns the workspace lock, and
- * threads that own the workspace lock must never block trying to acquire a resource rule.
- */
- class NotifyRule implements ISchedulingRule {
- public boolean contains(ISchedulingRule rule) {
- return (rule instanceof IResource) || rule.getClass().equals(NotifyRule.class);
- }
-
- public boolean isConflicting(ISchedulingRule rule) {
- return contains(rule);
- }
- }
-
- /**
- * Indicates that the last checkIn failed, either due to cancelation or due to the workspace tree
- * being locked for modifications (during resource change events).
- */
- private final ThreadLocal The failure flag is reset immediately after calling this method. Subsequent calls to this
- * method will indicate no failure (unless a new failure has occurred).
- *
- * @return Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.core.internal.utils;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Date;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-
-public class Policy {
- // public static final DebugOptionsListener RESOURCES_DEBUG_OPTIONS_LISTENER = new
- // DebugOptionsListener() {
- // public void optionsChanged(DebugOptions options) {
- // DEBUG = options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/debug", false);
- // //$NON-NLS-1$
- //
- // DEBUG_AUTO_REFRESH = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/refresh", false); //$NON-NLS-1$
- //
- // DEBUG_BUILD_DELTA = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/build/delta", false); //$NON-NLS-1$
- // DEBUG_BUILD_FAILURE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/build/failure", false); //$NON-NLS-1$
- // DEBUG_BUILD_INTERRUPT =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/interrupt",
- // false); //$NON-NLS-1$
- // DEBUG_BUILD_INVOKING = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/build/invoking", false);
- // //$NON-NLS-1$
- // DEBUG_BUILD_NEEDED = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/build/needbuild", false); //$NON-NLS-1$
- // DEBUG_BUILD_NEEDED_STACK =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/needbuildstack",
- // false); //$NON-NLS-1$
- // DEBUG_BUILD_STACK = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/build/stacktrace", false); //$NON-NLS-1$
- //
- // DEBUG_CONTENT_TYPE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/contenttype", false); //$NON-NLS-1$
- // DEBUG_CONTENT_TYPE_CACHE =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/contenttype/cache",
- // false); //$NON-NLS-1$
- // DEBUG_HISTORY = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/history",
- // false); //$NON-NLS-1$
- // DEBUG_NATURES = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/natures",
- // false); //$NON-NLS-1$
- // DEBUG_NOTIFICATIONS = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/notifications", false); //$NON-NLS-1$
- // DEBUG_PREFERENCES = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/preferences", false); //$NON-NLS-1$
- //
- // DEBUG_RESTORE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/restore",
- // false); //$NON-NLS-1$
- // DEBUG_RESTORE_MARKERS =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/restore/markers",
- // false); //$NON-NLS-1$
- // DEBUG_RESTORE_MASTERTABLE =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/restore/mastertable",
- // false); //$NON-NLS-1$
- // DEBUG_RESTORE_METAINFO =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/restore/metainfo",
- // false); //$NON-NLS-1$
- // DEBUG_RESTORE_SNAPSHOTS =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/restore/snapshots",
- // false); //$NON-NLS-1$
- // DEBUG_RESTORE_SYNCINFO =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/restore/syncinfo",
- // false); //$NON-NLS-1$
- // DEBUG_RESTORE_TREE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/restore/tree", false); //$NON-NLS-1$
- //
- // DEBUG_SAVE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/save",
- // false); //$NON-NLS-1$
- // DEBUG_SAVE_MARKERS = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/save/markers", false); //$NON-NLS-1$
- // DEBUG_SAVE_MASTERTABLE =
- // DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/save/mastertable",
- // false); //$NON-NLS-1$
- // DEBUG_SAVE_METAINFO = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/save/metainfo", false); //$NON-NLS-1$
- // DEBUG_SAVE_SYNCINFO = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/save/syncinfo", false); //$NON-NLS-1$
- // DEBUG_SAVE_TREE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES +
- // "/save/tree", false); //$NON-NLS-1$
- //
- // DEBUG_STRINGS = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/strings",
- // false); //$NON-NLS-1$
- // }
- // };
-
- public static final boolean buildOnCancel = false;
- // general debug flag for the plugin
- public static boolean DEBUG = false;
-
- public static boolean DEBUG_AUTO_REFRESH = false;
-
- // debug constants
- public static boolean DEBUG_BUILD_DELTA = false;
- public static boolean DEBUG_BUILD_FAILURE = false;
- public static boolean DEBUG_BUILD_INTERRUPT = false;
- public static boolean DEBUG_BUILD_INVOKING = false;
- public static boolean DEBUG_BUILD_NEEDED = false;
- public static boolean DEBUG_BUILD_NEEDED_STACK = false;
- public static boolean DEBUG_BUILD_STACK = false;
-
- public static boolean DEBUG_CONTENT_TYPE = false;
- public static boolean DEBUG_CONTENT_TYPE_CACHE = false;
- public static boolean DEBUG_HISTORY = false;
- public static boolean DEBUG_NATURES = false;
- public static boolean DEBUG_NOTIFICATIONS = false;
- public static boolean DEBUG_PREFERENCES = false;
- // Get timing information for restoring data
- public static boolean DEBUG_RESTORE = false;
- public static boolean DEBUG_RESTORE_MARKERS = false;
- public static boolean DEBUG_RESTORE_MASTERTABLE = false;
-
- public static boolean DEBUG_RESTORE_METAINFO = false;
- public static boolean DEBUG_RESTORE_SNAPSHOTS = false;
- public static boolean DEBUG_RESTORE_SYNCINFO = false;
- public static boolean DEBUG_RESTORE_TREE = false;
- // Get timing information for save and snapshot data
- public static boolean DEBUG_SAVE = false;
- public static boolean DEBUG_SAVE_MARKERS = false;
- public static boolean DEBUG_SAVE_MASTERTABLE = false;
-
- public static boolean DEBUG_SAVE_METAINFO = false;
- public static boolean DEBUG_SAVE_SYNCINFO = false;
- public static boolean DEBUG_SAVE_TREE = false;
- public static boolean DEBUG_STRINGS = false;
- public static int endOpWork = 1;
- public static final long MAX_BUILD_DELAY = 1000;
-
- public static final long MIN_BUILD_DELAY = 100;
- public static int opWork = 99;
- public static final int totalWork = 100;
-
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- }
-
- /**
- * Print a debug message to the console. Prepend the message with the current date, the name of
- * the current thread and the current job if present.
- */
- public static void debug(String message) {
- StringBuilder output = new StringBuilder();
- output.append(new Date(System.currentTimeMillis()));
- output.append(" - ["); // $NON-NLS-1$
- output.append(Thread.currentThread().getName());
- output.append("] "); // $NON-NLS-1$
- Job currentJob = Job.getJobManager().currentJob();
- if (currentJob != null) {
- output.append(currentJob.getClass().getName());
- output.append("("); // $NON-NLS-1$
- output.append(currentJob.getName());
- output.append("): "); // $NON-NLS-1$
- }
- output.append(message);
- System.out.println(output.toString());
- }
-
- /** Print a debug throwable to the console. */
- public static void debug(Throwable t) {
- StringWriter writer = new StringWriter();
- t.printStackTrace(new PrintWriter(writer));
- String str = writer.toString();
- if (str.endsWith("\n")) // $NON-NLS-1$
- str = str.substring(0, str.length() - 2);
- debug(str);
- }
-
- public static void log(int severity, String message, Throwable t) {
- if (message == null) message = ""; // $NON-NLS-1$
- log(new Status(severity, ResourcesPlugin.getPluginId(), 1, message, t));
- }
-
- public static void log(IStatus status) {
- // final Bundle bundle = Platform.getBundle(ResourcesPlugin.PI_RESOURCES);
- // if (bundle == null)
- // return;
- // Platform.getLog(bundle).log(status);
- ResourcesPlugin.log(status);
- }
-
- /**
- * Logs a throwable, assuming severity of error
- *
- * @param t
- */
- public static void log(Throwable t) {
- log(IStatus.ERROR, "Internal Error", t); // $NON-NLS-1$
- }
-
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- return monitor == null ? new NullProgressMonitor() : monitor;
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null) return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor) return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks, int style) {
- if (monitor == null) return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor) return monitor;
- return new SubProgressMonitor(monitor, ticks, style);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/dtree/IComparator.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/dtree/IComparator.java
deleted file mode 100644
index ab91e475c4b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/dtree/IComparator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.dtree;
-
-/**
- * An interface for comparing two data tree objects. Provides information on how an object has
- * changed from one tree to another.
- */
-public interface IComparator {
- /**
- * Returns an integer describing the changes between two data objects in a data tree. The first
- * three bits of the returned integer are used during calculation of delta trees. The remaining
- * bits can be assigned any meaning that is useful to the client. If there is no change in the two
- * data objects, this method must return 0.
- *
- * @see NodeComparison
- */
- int compare(Object o1, Object o2);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/events/ILifecycleListener.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/events/ILifecycleListener.java
deleted file mode 100644
index 7d145ddf04e..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/events/ILifecycleListener.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.events;
-
-import org.eclipse.core.runtime.CoreException;
-
-/** Interface for clients interested in receiving notification of workspace lifecycle events. */
-public interface ILifecycleListener {
- public void handleEvent(LifecycleEvent event) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/events/LifecycleEvent.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/events/LifecycleEvent.java
deleted file mode 100644
index 062595e27eb..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/events/LifecycleEvent.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation Serge Beauchamp (Freescale
- * Semiconductor) - [229633] Group Support
- * *****************************************************************************
- */
-package org.eclipse.core.internal.events;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * Class used for broadcasting internal workspace lifecycle events. There is a singleton instance,
- * so no listener is allowed to keep references to the event after the notification is finished.
- */
-public class LifecycleEvent {
- // constants for kinds of internal workspace lifecycle events
- public static final int PRE_PROJECT_CLOSE = 0x01;
- public static final int POST_PROJECT_CHANGE = 0x02;
- public static final int PRE_PROJECT_COPY = 0x04;
- public static final int PRE_PROJECT_CREATE = 0x08;
-
- public static final int PRE_PROJECT_DELETE = 0x10;
- public static final int PRE_PROJECT_OPEN = 0x20;
- public static final int PRE_PROJECT_MOVE = 0x40;
-
- public static final int PRE_LINK_COPY = 0x100;
- public static final int PRE_LINK_CREATE = 0x200;
- public static final int PRE_LINK_DELETE = 0x400;
- public static final int PRE_LINK_MOVE = 0x800;
- public static final int PRE_REFRESH = 0x1000;
-
- public static final int PRE_GROUP_COPY = 0x2000;
- public static final int PRE_GROUP_CREATE = 0x4000;
- public static final int PRE_GROUP_DELETE = 0x8000;
- public static final int PRE_GROUP_MOVE = 0x10000;
-
- public static final int PRE_FILTER_ADD = 0x20000;
- public static final int PRE_FILTER_REMOVE = 0x40000;
-
- public static final int PRE_LINK_CHANGE = 0x80000;
-
- /** The kind of event */
- public int kind;
- /**
- * For events that only involve one resource, this is it. More specifically, this is used for all
- * events that don't involve a more or copy. For copy/move events, this resource represents the
- * source of the copy/move.
- */
- public IResource resource;
- /** For copy/move events, this resource represents the destination of the copy/move. */
- public IResource newResource;
-
- /** The update flags for the event. */
- public int updateFlags;
-
- private static final LifecycleEvent instance = new LifecycleEvent();
-
- private LifecycleEvent() {
- super();
- }
-
- public static LifecycleEvent newEvent(int kind, IResource resource) {
- instance.kind = kind;
- instance.resource = resource;
- instance.newResource = null;
- instance.updateFlags = 0;
- return instance;
- }
-
- public static LifecycleEvent newEvent(
- int kind, IResource oldResource, IResource newResource, int updateFlags) {
- instance.kind = kind;
- instance.resource = oldResource;
- instance.newResource = newResource;
- instance.updateFlags = updateFlags;
- return instance;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ICoreConstants.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ICoreConstants.java
deleted file mode 100644
index aab5f18c8ec..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ICoreConstants.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation Serge Beauchamp (Freescale
- * Semiconductor) - [229633] Group Support Broadcom Corporation - build configurations
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.core.resources.IBuildConfiguration;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.QualifiedName;
-
-public interface ICoreConstants {
-
- // Standard resource properties
- /** map of builders to their last built state. */
- public static final QualifiedName K_BUILD_LIST =
- new QualifiedName(ResourcesPlugin.PI_RESOURCES, "BuildMap"); // $NON-NLS-1$
-
- /** Command line argument indicating a workspace refresh on startup is requested. */
- public static final String REFRESH_ON_STARTUP = "-refresh"; // $NON-NLS-1$
-
- // resource info constants
- static final long I_NULL_SYNC_INFO = -1;
-
- // Useful flag masks for resource info states
- static final int M_OPEN = 0x1;
- static final int M_LOCAL_EXISTS = 0x2;
- static final int M_PHANTOM = 0x8;
- static final int M_USED = 0x10;
- static final int M_TYPE = 0xF00;
- static final int M_TYPE_START = 8;
- static final int M_MARKERS_SNAP_DIRTY = 0x1000;
- static final int M_SYNCINFO_SNAP_DIRTY = 0x2000;
- /**
- * Marks this resource as derived.
- *
- * @since 2.0
- */
- static final int M_DERIVED = 0x4000;
- /**
- * Marks this resource as a team-private member of its container.
- *
- * @since 2.0
- */
- static final int M_TEAM_PRIVATE_MEMBER = 0x8000;
- /**
- * Marks this resource as a hidden resource.
- *
- * @since 3.4
- */
- static final int M_HIDDEN = 0x200000;
-
- /**
- * Marks this resource as a linked resource.
- *
- * @since 2.1
- */
- static final int M_LINK = 0x10000;
- /**
- * Marks this resource as virtual.
- *
- * @since 3.6
- */
- static final int M_VIRTUAL = 0x80000;
- /**
- * The file has no content description.
- *
- * @since 3.0
- */
- static final int M_NO_CONTENT_DESCRIPTION = 0x20000;
- /**
- * The file has a default content description.
- *
- * @since 3.0
- */
- static final int M_DEFAULT_CONTENT_DESCRIPTION = 0x40000;
-
- /**
- * Marks this resource as having undiscovered children
- *
- * @since 3.1
- */
- static final int M_CHILDREN_UNKNOWN = 0x100000;
-
- /**
- * Set of flags that should be cleared when the contents for a file change.
- *
- * @since 3.0
- */
- static final int M_CONTENT_CACHE = M_NO_CONTENT_DESCRIPTION | M_DEFAULT_CONTENT_DESCRIPTION;
-
- static final int NULL_FLAG = -1;
-
- /**
- * A private preference stored in a preference node to indicate the preference version that is
- * used. This version identifier is used to handle preference migration when old preferences are
- * loaded.
- */
- public static final String PREF_VERSION_KEY = "version"; // $NON-NLS-1$
-
- /**
- * A private preference stored in a preference node to indicate the preference version that is
- * used. This version identifier is used to handle preference migration when old preferences are
- * loaded.
- */
- public static final String PREF_VERSION = "1"; // $NON-NLS-1$
-
- // Internal status codes
- // Information Only [00-24]
- // Warnings [25-74]
- public static final int CRASH_DETECTED = 10035;
-
- // Errors [75-99]
-
- public static final int PROJECT_SEGMENT_LENGTH = 1;
- public static final int MINIMUM_FOLDER_SEGMENT_LENGTH = 2;
- public static final int MINIMUM_FILE_SEGMENT_LENGTH = 2;
-
- public static final int WORKSPACE_TREE_VERSION_1 = 67305985;
- public static final int WORKSPACE_TREE_VERSION_2 = 67305986;
-
- // helper constants for empty structures
- public static final IBuildConfiguration[] EMPTY_BUILD_CONFIG_ARRAY = new IBuildConfiguration[0];
- public static final IProject[] EMPTY_PROJECT_ARRAY = new IProject[0];
- public static final IResource[] EMPTY_RESOURCE_ARRAY = new IResource[0];
- public static final IFileState[] EMPTY_FILE_STATES = new IFileState[0];
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/IManager.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/IManager.java
deleted file mode 100644
index d02cf3141b1..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/IManager.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-public interface IManager {
- public void shutdown(IProgressMonitor monitor) throws CoreException;
-
- public void startup(IProgressMonitor monitor) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/InternalTeamHook.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/InternalTeamHook.java
deleted file mode 100644
index 1457ca51e62..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/InternalTeamHook.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM - Initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.che.core.internal.resources.Workspace;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.team.TeamHook;
-
-/**
- * The internal abstract superclass of all TeamHook implementations. This superclass provides access
- * to internal non-API methods that are not available from the API package. Plugin developers should
- * not subclass this class.
- *
- * @see TeamHook
- */
-public class InternalTeamHook {
- /* (non-Javadoc)
- * Internal implementation of TeamHook#setRulesFor(IProject,IResourceRuleFactory)
- */
- protected void setRuleFactory(IProject project, IResourceRuleFactory factory) {
- Workspace workspace = ((Workspace) project.getWorkspace());
- ((Rules) workspace.getRuleFactory()).setRuleFactory(project, factory);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ModelObject.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ModelObject.java
deleted file mode 100644
index e5be8993c30..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ModelObject.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2017 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-public abstract class ModelObject implements Cloneable {
- protected String name;
-
- public ModelObject() {
- super();
- }
-
- public ModelObject(String name) {
- setName(name);
- }
-
- @Override
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException e) {
- return null; // won't happen
- }
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String value) {
- name = value;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/OS.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/OS.java
deleted file mode 100644
index d3efb63c692..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/OS.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-/**
- * Captures platform specific attributes relevant to the core resources plugin. This class is not
- * intended to be instantiated.
- */
-public abstract class OS {
- // private static final String INSTALLED_PLATFORM;
-
- public static final char[] INVALID_RESOURCE_CHARACTERS;
- private static final String[] INVALID_RESOURCE_BASENAMES;
- private static final String[] INVALID_RESOURCE_FULLNAMES;
-
- static {
- // find out the OS being used
- // setup the invalid names
- // INSTALLED_PLATFORM = Platform.getOS();
- // if (INSTALLED_PLATFORM.equals(Platform.OS_WIN32)) {
- // //valid names and characters taken from
- // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp
- // INVALID_RESOURCE_CHARACTERS = new char[] {'\\', '/', ':', '*', '?', '"', '<', '>', '|'};
- // INVALID_RESOURCE_BASENAMES = new String[] {"aux", "com1", "com2", "com3", "com4",
- // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- // "com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$
- // //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- // //$NON-NLS-8$
- // "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn"}; //$NON-NLS-1$
- // //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- // //$NON-NLS-8$ //$NON-NLS-9$
- // Arrays.sort(INVALID_RESOURCE_BASENAMES);
- // //CLOCK$ may be used if an extension is provided
- // INVALID_RESOURCE_FULLNAMES = new String[] {"clock$"}; //$NON-NLS-1$
- // } else {
- // only front slash and null char are invalid on UNIXes
- // taken from http://www.faqs.org/faqs/unix-faq/faq/part2/section-2.html
- INVALID_RESOURCE_CHARACTERS =
- new char[] {
- '/', '\0',
- };
- INVALID_RESOURCE_BASENAMES = null;
- INVALID_RESOURCE_FULLNAMES = null;
- // }
- }
-
- /**
- * Returns true if the given name is a valid resource name on this operating system, and false
- * otherwise.
- */
- public static boolean isNameValid(String name) {
- // . and .. have special meaning on all platforms
- if (name.equals(".") || name.equals("..")) // $NON-NLS-1$ //$NON-NLS-2$
- return false;
- // if (INSTALLED_PLATFORM.equals(Platform.OS_WIN32)) {
- // //empty names are not valid
- // final int length = name.length();
- // if (length == 0)
- // return false;
- // final char lastChar = name.charAt(length-1);
- // // filenames ending in dot are not valid
- // if (lastChar == '.')
- // return false;
- // // file names ending with whitespace are truncated (bug 118997)
- // if (Character.isWhitespace(lastChar))
- // return false;
- // int dot = name.indexOf('.');
- // //on windows, filename suffixes are not relevant to name validity
- // String basename = dot == -1 ? name : name.substring(0, dot);
- // if (Arrays.binarySearch(INVALID_RESOURCE_BASENAMES, basename.toLowerCase()) >= 0)
- // return false;
- // return Arrays.binarySearch(INVALID_RESOURCE_FULLNAMES, name.toLowerCase()) < 0;
- // }
- return true;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/PreferenceInitializer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/PreferenceInitializer.java
deleted file mode 100644
index 6493d213232..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/PreferenceInitializer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2017 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-
-/** @since 3.1 */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- // internal preference keys
- public static final String PREF_OPERATIONS_PER_SNAPSHOT = "snapshots.operations"; // $NON-NLS-1$
- public static final String PREF_DELTA_EXPIRATION = "delta.expiration"; // $NON-NLS-1$
-
- // DEFAULTS
- public static final boolean PREF_AUTO_REFRESH_DEFAULT = false;
- public static final boolean PREF_LIGHTWEIGHT_AUTO_REFRESH_DEFAULT = false;
- public static final boolean PREF_DISABLE_LINKING_DEFAULT = false;
- public static final String PREF_ENCODING_DEFAULT = ""; // $NON-NLS-1$
- public static final boolean PREF_AUTO_BUILDING_DEFAULT = true;
- public static final String PREF_BUILD_ORDER_DEFAULT = ""; // $NON-NLS-1$
- public static final int PREF_MAX_BUILD_ITERATIONS_DEFAULT = 10;
- public static final boolean PREF_DEFAULT_BUILD_ORDER_DEFAULT = true;
- public static final long PREF_SNAPSHOT_INTERVAL_DEFAULT = 5 * 60 * 1000L; // 5 min
- public static final int PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT = 100;
- public static final boolean PREF_APPLY_FILE_STATE_POLICY_DEFAULT = true;
- public static final long PREF_FILE_STATE_LONGEVITY_DEFAULT = 7 * 24 * 3600 * 1000L; // 7 days
- public static final long PREF_MAX_FILE_STATE_SIZE_DEFAULT = 1024 * 1024L; // 1 MB
- public static final int PREF_MAX_FILE_STATES_DEFAULT = 50;
- public static final long PREF_DELTA_EXPIRATION_DEFAULT = 30 * 24 * 3600 * 1000L; // 30 days
-
- public PreferenceInitializer() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- @Override
- public void initializeDefaultPreferences() {
- IEclipsePreferences node = DefaultScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES);
- // auto-refresh default
- node.putBoolean(ResourcesPlugin.PREF_AUTO_REFRESH, PREF_AUTO_REFRESH_DEFAULT);
- node.putBoolean(
- ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, PREF_LIGHTWEIGHT_AUTO_REFRESH_DEFAULT);
-
- // linked resources default
- node.putBoolean(ResourcesPlugin.PREF_DISABLE_LINKING, PREF_DISABLE_LINKING_DEFAULT);
-
- // build manager defaults
- node.putBoolean(ResourcesPlugin.PREF_AUTO_BUILDING, PREF_AUTO_BUILDING_DEFAULT);
- node.put(ResourcesPlugin.PREF_BUILD_ORDER, PREF_BUILD_ORDER_DEFAULT);
- node.putInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS, PREF_MAX_BUILD_ITERATIONS_DEFAULT);
- node.putBoolean(ResourcesPlugin.PREF_DEFAULT_BUILD_ORDER, PREF_DEFAULT_BUILD_ORDER_DEFAULT);
-
- // history store defaults
- node.putBoolean(
- ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PREF_APPLY_FILE_STATE_POLICY_DEFAULT);
- node.putLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PREF_FILE_STATE_LONGEVITY_DEFAULT);
- node.putLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE, PREF_MAX_FILE_STATE_SIZE_DEFAULT);
- node.putInt(ResourcesPlugin.PREF_MAX_FILE_STATES, PREF_MAX_FILE_STATES_DEFAULT);
-
- // save manager defaults
- node.putLong(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL, PREF_SNAPSHOT_INTERVAL_DEFAULT);
- node.putInt(PREF_OPERATIONS_PER_SNAPSHOT, PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT);
- node.putLong(PREF_DELTA_EXPIRATION, PREF_DELTA_EXPIRATION_DEFAULT);
-
- // encoding defaults
- node.put(ResourcesPlugin.PREF_ENCODING, PREF_ENCODING_DEFAULT);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ResourceException.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ResourceException.java
deleted file mode 100644
index 068b68cbdf4..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ResourceException.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A checked exception representing a failure.
- *
- * Resource exceptions contain a status object describing the cause of the exception, and
- * optionally the path of the resource where the failure occurred.
- *
- * @see IStatus
- */
-public class ResourceException extends CoreException {
- /** All serializable objects should have a stable serialVersionUID */
- private static final long serialVersionUID = 1L;
-
- public ResourceException(int code, IPath path, String message, Throwable exception) {
- super(new ResourceStatus(code, path, message, exception));
- }
-
- /**
- * Constructs a new exception with the given status object.
- *
- * @param status the status object to be associated with this exception
- * @see IStatus
- */
- public ResourceException(IStatus status) {
- super(status);
- }
-
- /**
- * Prints a stack trace out for the exception, and any nested exception that it may have embedded
- * in its Status object.
- */
- @Override
- public void printStackTrace() {
- printStackTrace(System.err);
- }
-
- /**
- * Prints a stack trace out for the exception, and any nested exception that it may have embedded
- * in its Status object.
- */
- @Override
- public void printStackTrace(PrintStream output) {
- synchronized (output) {
- IStatus status = getStatus();
- if (status.getException() != null) {
- String path = "()"; // $NON-NLS-1$
- if (status instanceof IResourceStatus)
- path = "(" + ((IResourceStatus) status).getPath() + ")"; // $NON-NLS-1$ //$NON-NLS-2$
- output.print(
- getClass().getName()
- + path
- + "["
- + status.getCode()
- + "]: "); // $NON-NLS-1$ //$NON-NLS-2$
- status.getException().printStackTrace(output);
- } else super.printStackTrace(output);
- }
- }
-
- /**
- * Prints a stack trace out for the exception, and any nested exception that it may have embedded
- * in its Status object.
- */
- @Override
- public void printStackTrace(PrintWriter output) {
- synchronized (output) {
- IStatus status = getStatus();
- if (status.getException() != null) {
- String path = "()"; // $NON-NLS-1$
- if (status instanceof IResourceStatus)
- path = "(" + ((IResourceStatus) status).getPath() + ")"; // $NON-NLS-1$ //$NON-NLS-2$
- output.print(
- getClass().getName()
- + path
- + "["
- + status.getCode()
- + "]: "); // $NON-NLS-1$ //$NON-NLS-2$
- status.getException().printStackTrace(output);
- } else super.printStackTrace(output);
- }
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ResourceStatus.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ResourceStatus.java
deleted file mode 100644
index 2ebfa15c26f..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/ResourceStatus.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/** */
-public class ResourceStatus extends Status implements IResourceStatus {
- IPath path;
-
- public ResourceStatus(int type, int code, IPath path, String message, Throwable exception) {
- super(type, ResourcesPlugin.PI_RESOURCES, code, message, exception);
- this.path = path;
- }
-
- public ResourceStatus(int code, String message) {
- this(getSeverity(code), code, null, message, null);
- }
-
- public ResourceStatus(int code, IPath path, String message) {
- this(getSeverity(code), code, path, message, null);
- }
-
- public ResourceStatus(int code, IPath path, String message, Throwable exception) {
- this(getSeverity(code), code, path, message, exception);
- }
-
- /** @see IResourceStatus#getPath() */
- public IPath getPath() {
- return path;
- }
-
- protected static int getSeverity(int code) {
- return code == 0 ? 0 : 1 << (code % 100 / 33);
- }
-
- // for debug only
- private String getTypeName() {
- switch (getSeverity()) {
- case IStatus.OK:
- return "OK"; // $NON-NLS-1$
- case IStatus.ERROR:
- return "ERROR"; // $NON-NLS-1$
- case IStatus.INFO:
- return "INFO"; // $NON-NLS-1$
- case IStatus.WARNING:
- return "WARNING"; // $NON-NLS-1$
- default:
- return String.valueOf(getSeverity());
- }
- }
-
- // for debug only
- @Override
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("[type: "); // $NON-NLS-1$
- sb.append(getTypeName());
- sb.append("], [path: "); // $NON-NLS-1$
- sb.append(getPath());
- sb.append("], [message: "); // $NON-NLS-1$
- sb.append(getMessage());
- sb.append("], [plugin: "); // $NON-NLS-1$
- sb.append(getPlugin());
- sb.append("], [exception: "); // $NON-NLS-1$
- sb.append(getException());
- sb.append("]\n"); // $NON-NLS-1$
- return sb.toString();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/Rules.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/Rules.java
deleted file mode 100644
index d85e4a25433..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/Rules.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2017 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import org.eclipse.che.core.internal.resources.Workspace;
-import org.eclipse.core.internal.events.ILifecycleListener;
-import org.eclipse.core.internal.events.LifecycleEvent;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.team.ResourceRuleFactory;
-import org.eclipse.core.resources.team.TeamHook;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-
-/**
- * Class for calculating scheduling rules for resource changing operations. This factory delegates
- * to the TeamHook to obtain an appropriate factory for the resource that the operation is proposing
- * to modify.
- */
-public class Rules implements IResourceRuleFactory, ILifecycleListener {
- private final ResourceRuleFactory defaultFactory = new ResourceRuleFactory() {
- /**/
- };
- /** Map of project names to the factory for that project. */
- private final Map Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.core.resources.IWorkspaceDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-
-/** @see IWorkspaceDescription */
-public class WorkspaceDescription extends ModelObject implements IWorkspaceDescription {
- protected boolean autoBuilding;
- protected String[] buildOrder;
- protected long fileStateLongevity;
- protected int maxBuildIterations;
- protected int maxFileStates;
- protected long maxFileStateSize;
- protected boolean applyFileStatePolicy;
- private long snapshotInterval;
- protected int operationsPerSnapshot;
- protected long deltaExpiration;
-
- public WorkspaceDescription(String name) {
- super(name);
- // initialize based on the values in the default preferences
- IEclipsePreferences node = DefaultScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES);
- autoBuilding =
- node.getBoolean(
- ResourcesPlugin.PREF_AUTO_BUILDING, PreferenceInitializer.PREF_AUTO_BUILDING_DEFAULT);
- maxBuildIterations =
- node.getInt(
- ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS,
- PreferenceInitializer.PREF_MAX_BUILD_ITERATIONS_DEFAULT);
- applyFileStatePolicy =
- node.getBoolean(
- ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY,
- PreferenceInitializer.PREF_APPLY_FILE_STATE_POLICY_DEFAULT);
- fileStateLongevity =
- node.getLong(
- ResourcesPlugin.PREF_FILE_STATE_LONGEVITY,
- PreferenceInitializer.PREF_FILE_STATE_LONGEVITY_DEFAULT);
- maxFileStates =
- node.getInt(
- ResourcesPlugin.PREF_MAX_FILE_STATES,
- PreferenceInitializer.PREF_MAX_FILE_STATES_DEFAULT);
- maxFileStateSize =
- node.getLong(
- ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE,
- PreferenceInitializer.PREF_MAX_FILE_STATE_SIZE_DEFAULT);
- snapshotInterval =
- node.getLong(
- ResourcesPlugin.PREF_SNAPSHOT_INTERVAL,
- PreferenceInitializer.PREF_SNAPSHOT_INTERVAL_DEFAULT);
- operationsPerSnapshot =
- node.getInt(
- PreferenceInitializer.PREF_OPERATIONS_PER_SNAPSHOT,
- PreferenceInitializer.PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT);
- deltaExpiration =
- node.getLong(
- PreferenceInitializer.PREF_DELTA_EXPIRATION,
- PreferenceInitializer.PREF_DELTA_EXPIRATION_DEFAULT);
- }
-
- /** @see IWorkspaceDescription#getBuildOrder() */
- public String[] getBuildOrder() {
- return getBuildOrder(true);
- }
-
- public String[] getBuildOrder(boolean makeCopy) {
- if (buildOrder == null) return null;
- return makeCopy ? (String[]) buildOrder.clone() : buildOrder;
- }
-
- public long getDeltaExpiration() {
- return deltaExpiration;
- }
-
- public void setDeltaExpiration(long value) {
- deltaExpiration = value;
- }
-
- /** @see IWorkspaceDescription#getFileStateLongevity() */
- public long getFileStateLongevity() {
- return fileStateLongevity;
- }
-
- /** @see IWorkspaceDescription#getMaxBuildIterations() */
- public int getMaxBuildIterations() {
- return maxBuildIterations;
- }
-
- /** @see IWorkspaceDescription#getMaxFileStates() */
- public int getMaxFileStates() {
- return maxFileStates;
- }
-
- /** @see IWorkspaceDescription#getMaxFileStateSize() */
- public long getMaxFileStateSize() {
- return maxFileStateSize;
- }
-
- /** @see IWorkspaceDescription#isApplyFileStatePolicy() */
- public boolean isApplyFileStatePolicy() {
- return applyFileStatePolicy;
- }
-
- public int getOperationsPerSnapshot() {
- return operationsPerSnapshot;
- }
-
- /** @see IWorkspaceDescription#getSnapshotInterval() */
- public long getSnapshotInterval() {
- return snapshotInterval;
- }
-
- public void internalSetBuildOrder(String[] value) {
- buildOrder = value;
- }
-
- /** @see IWorkspaceDescription#isAutoBuilding() */
- public boolean isAutoBuilding() {
- return autoBuilding;
- }
-
- public void setOperationsPerSnapshot(int value) {
- operationsPerSnapshot = value;
- }
-
- /** @see IWorkspaceDescription#setAutoBuilding(boolean) */
- public void setAutoBuilding(boolean value) {
- autoBuilding = value;
- }
-
- /** @see IWorkspaceDescription#setBuildOrder(String[]) */
- public void setBuildOrder(String[] value) {
- buildOrder = (value == null) ? null : (String[]) value.clone();
- }
-
- /** @see IWorkspaceDescription#setFileStateLongevity(long) */
- public void setFileStateLongevity(long time) {
- fileStateLongevity = time;
- }
-
- /** @see IWorkspaceDescription#setMaxBuildIterations(int) */
- public void setMaxBuildIterations(int number) {
- maxBuildIterations = number;
- }
-
- /** @see IWorkspaceDescription#setMaxFileStates(int) */
- public void setMaxFileStates(int number) {
- maxFileStates = number;
- }
-
- /** @see IWorkspaceDescription#setMaxFileStateSize(long) */
- public void setMaxFileStateSize(long size) {
- maxFileStateSize = size;
- }
-
- /** @see IWorkspaceDescription#setApplyFileStatePolicy(boolean) */
- public void setApplyFileStatePolicy(boolean apply) {
- applyFileStatePolicy = apply;
- }
-
- /** @see IWorkspaceDescription#setSnapshotInterval(long) */
- public void setSnapshotInterval(long snapshotInterval) {
- this.snapshotInterval = snapshotInterval;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/mapping/ModelProviderManager.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/mapping/ModelProviderManager.java
deleted file mode 100644
index 3c7bbc7d1ea..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/resources/mapping/ModelProviderManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.internal.resources.mapping;
-
-import java.util.Map;
-import org.eclipse.core.resources.mapping.IModelProviderDescriptor;
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.runtime.CoreException;
-
-public class ModelProviderManager {
-
- private static Map Contributors: IBM - Initial API and implementation Serge Beauchamp (Freescale Semiconductor) -
- * [252996] add resource filtering Serge Beauchamp (Freescale Semiconductor) - [229633] Group and
- * Project Path Variable Support Francis Lynch (Wind River) - [301563] Save and load tree snapshots
- * Martin Oberhuber (Wind River) - [306575] Save snapshot location with project
- * *****************************************************************************
- */
-package org.eclipse.core.internal.utils;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME =
- "org.eclipse.core.internal.utils.messages"; // $NON-NLS-1$
-
- // dtree
- public static String dtree_immutable;
- public static String dtree_malformedTree;
- public static String dtree_missingChild;
- public static String dtree_notFound;
- public static String dtree_notImmutable;
- public static String dtree_reverse;
- public static String dtree_subclassImplement;
- public static String dtree_switchError;
-
- // events
- public static String events_builderError;
- public static String events_building_0;
- public static String events_building_1;
- public static String events_errors;
- public static String events_instantiate_1;
- public static String events_invoking_1;
- public static String events_invoking_2;
- public static String events_skippingBuilder;
- public static String events_unknown;
-
- public static String history_copyToNull;
- public static String history_copyToSelf;
- public static String history_errorContentDescription;
- public static String history_notValid;
- public static String history_problemsCleaning;
-
- public static String links_creating;
- public static String links_errorLinkReconcile;
- public static String links_invalidLocation;
- public static String links_localDoesNotExist;
- public static String links_locationOverlapsLink;
- public static String links_locationOverlapsProject;
- public static String links_natureVeto;
- public static String links_noPath;
- public static String links_overlappingResource;
- public static String links_parentNotAccessible;
- public static String links_notFileFolder;
- public static String links_updatingDuplicate;
- public static String links_vetoNature;
- public static String links_workspaceVeto;
- public static String links_wrongLocalType;
- public static String links_resourceIsNotALink;
- public static String links_setLocation;
-
- public static String group_invalidParent;
- public static String filters_missingFilterType;
-
- // local store
- public static String localstore_copying;
- public static String localstore_copyProblem;
- public static String localstore_couldnotDelete;
- public static String localstore_couldNotMove;
- public static String localstore_couldNotRead;
- public static String localstore_couldNotWrite;
- public static String localstore_couldNotWriteReadOnly;
- public static String localstore_deleteProblem;
- public static String localstore_deleting;
- public static String localstore_failedReadDuringWrite;
- public static String localstore_fileExists;
- public static String localstore_fileNotFound;
- public static String localstore_locationUndefined;
- public static String localstore_refreshing;
- public static String localstore_refreshingRoot;
- public static String localstore_resourceExists;
- public static String localstore_resourceDoesNotExist;
- public static String localstore_resourceIsOutOfSync;
-
- // resource mappings and models
- public static String mapping_invalidDef;
- public static String mapping_wrongType;
- public static String mapping_noIdentifier;
- public static String mapping_validate;
- public static String mapping_multiProblems;
-
- // internal.resources
- public static String natures_duplicateNature;
- public static String natures_hasCycle;
- public static String natures_invalidDefinition;
- public static String natures_invalidRemoval;
- public static String natures_invalidSet;
- public static String natures_missingIdentifier;
- public static String natures_missingNature;
- public static String natures_missingPrerequisite;
- public static String natures_multipleSetMembers;
-
- public static String pathvar_beginLetter;
- public static String pathvar_invalidChar;
- public static String pathvar_invalidValue;
- public static String pathvar_length;
- public static String pathvar_undefined;
- public static String pathvar_whitespace;
-
- public static String preferences_deleteException;
- public static String preferences_loadException;
- public static String preferences_operationCanceled;
- public static String preferences_removeNodeException;
- public static String preferences_clearNodeException;
- public static String preferences_saveProblems;
- public static String preferences_syncException;
-
- public static String projRead_badArguments;
- public static String projRead_badFilterName;
- public static String projRead_badFilterID;
- public static String projRead_badFilterType;
- public static String projRead_badFilterType2;
- public static String projRead_badID;
- public static String projRead_badLinkLocation;
- public static String projRead_badLinkName;
- public static String projRead_badLinkType;
- public static String projRead_badLinkType2;
- public static String projRead_badLocation;
- public static String projRead_badSnapshotLocation;
- public static String projRead_cannotReadSnapshot;
- public static String projRead_emptyFilterName;
- public static String projRead_emptyLinkName;
- public static String projRead_emptyVariableName;
- public static String projRead_failureReadingProjectDesc;
- public static String projRead_notProjectDescription;
- public static String projRead_whichKey;
- public static String projRead_whichValue;
- public static String projRead_missingProjectName;
-
- public static String properties_couldNotClose;
- public static String properties_qualifierIsNull;
- public static String properties_readProperties;
- public static String properties_valueTooLong;
-
- // auto-refresh
- public static String refresh_installError;
- public static String refresh_jobName;
- public static String refresh_pollJob;
- public static String refresh_refreshErr;
- public static String refresh_task;
-
- public static String resources_cannotModify;
- public static String resources_changeInAdd;
- public static String resources_charsetBroadcasting;
- public static String resources_charsetUpdating;
- public static String resources_closing_0;
- public static String resources_closing_1;
- public static String resources_copyDestNotSub;
- public static String resources_copying;
- public static String resources_copying_0;
- public static String resources_copyNotMet;
- public static String resources_copyProblem;
- public static String resources_couldnotDelete;
- public static String resources_create;
- public static String resources_creating;
- public static String resources_deleteMeta;
- public static String resources_deleteProblem;
- public static String resources_deleting;
- public static String resources_deleting_0;
- public static String resources_destNotNull;
- public static String resources_errorContentDescription;
- public static String resources_errorDeleting;
- public static String resources_errorMarkersDelete;
- public static String resources_errorMarkersMove;
- public static String resources_wrongMarkerAttributeValueType;
- public static String resources_errorMembers;
- public static String resources_errorMoving;
- public static String resources_errorMultiRefresh;
- public static String resources_errorNature;
- public static String resources_errorPropertiesMove;
- public static String resources_errorReadProject;
- public static String resources_errorRefresh;
- public static String resources_errorValidator;
- public static String resources_errorVisiting;
- public static String resources_existsDifferentCase;
- public static String resources_existsLocalDifferentCase;
- public static String resources_exMasterTable;
- public static String resources_exReadProjectLocation;
- public static String resources_exSafeRead;
- public static String resources_exSafeSave;
- public static String resources_exSaveMaster;
- public static String resources_exSaveProjectLocation;
- public static String resources_fileExists;
- public static String resources_fileToProj;
- public static String resources_flushingContentDescriptionCache;
- public static String resources_folderOverFile;
- public static String resources_format;
- public static String resources_initHook;
- public static String resources_initTeamHook;
- public static String resources_initValidator;
- public static String resources_invalidCharInName;
- public static String resources_invalidCharInPath;
- public static String resources_invalidName;
- public static String resources_invalidPath;
- public static String resources_invalidProjDesc;
- public static String resources_invalidResourceName;
- public static String resources_invalidRoot;
- public static String resources_markerNotFound;
- public static String resources_missingProjectMeta;
- public static String resources_missingProjectMetaRepaired;
- public static String resources_moveDestNotSub;
- public static String resources_moveMeta;
- public static String resources_moveNotMet;
- public static String resources_moveNotProject;
- public static String resources_moveProblem;
- public static String resources_moveRoot;
- public static String resources_moving;
- public static String resources_moving_0;
- public static String resources_mustBeAbsolute;
- public static String resources_mustBeLocal;
- public static String resources_mustBeOpen;
- public static String resources_mustExist;
- public static String resources_mustNotExist;
- public static String resources_nameEmpty;
- public static String resources_nameNull;
- public static String resources_natureClass;
- public static String resources_natureDeconfig;
- public static String resources_natureExtension;
- public static String resources_natureFormat;
- public static String resources_natureImplement;
- public static String resources_notChild;
- public static String resources_oneHook;
- public static String resources_oneTeamHook;
- public static String resources_oneValidator;
- public static String resources_opening_1;
- public static String resources_overlapWorkspace;
- public static String resources_overlapProject;
- public static String resources_pathNull;
- public static String resources_projectDesc;
- public static String resources_projectDescSync;
- public static String resources_projectMustNotBeOpen;
- public static String resources_projectPath;
- public static String resources_pruningHistory;
- public static String resources_reading;
- public static String resources_readingEncoding;
- public static String resources_readingSnap;
- public static String resources_readMarkers;
- public static String resources_readMeta;
- public static String resources_readMetaWrongVersion;
- public static String resources_readOnly;
- public static String resources_readOnly2;
- public static String resources_readProjectMeta;
- public static String resources_readProjectTree;
- public static String resources_readSync;
- public static String resources_readWorkspaceMeta;
- public static String resources_readWorkspaceMetaValue;
- public static String resources_readWorkspaceSnap;
- public static String resources_readWorkspaceTree;
- public static String resources_refreshing;
- public static String resources_refreshingRoot;
- public static String resources_resetMarkers;
- public static String resources_resetSync;
- public static String resources_resourcePath;
- public static String resources_saveOp;
- public static String resources_saveProblem;
- public static String resources_saveWarnings;
- public static String resources_saving_0;
- public static String resources_savingEncoding;
- public static String resources_setDesc;
- public static String resources_setLocal;
- public static String resources_settingCharset;
- public static String resources_settingContents;
- public static String resources_settingDefaultCharsetContainer;
- public static String resources_settingDerivedFlag;
- public static String resources_shutdown;
- public static String resources_shutdownProblems;
- public static String resources_snapInit;
- public static String resources_snapRead;
- public static String resources_snapRequest;
- public static String resources_snapshot;
- public static String resources_startupProblems;
- public static String resources_touch;
- public static String resources_updating;
- public static String resources_updatingEncoding;
- public static String resources_workspaceClosed;
- public static String resources_workspaceOpen;
- public static String resources_writeMeta;
- public static String resources_writeWorkspaceMeta;
- public static String resources_errorResourceIsFiltered;
-
- public static String synchronizer_partnerNotRegistered;
-
- // URL
- public static String url_badVariant;
- public static String url_couldNotResolve_projectDoesNotExist;
- public static String url_couldNotResolve_URLProtocolHandlerCanNotResolveURL;
- public static String url_couldNotResolve_resourceLocationCanNotBeDetermined;
-
- // utils
- public static String utils_clone;
- public static String utils_stringJobName;
- // watson
- public static String watson_elementNotFound;
- public static String watson_illegalSubtree;
- public static String watson_immutable;
- public static String watson_noModify;
- public static String watson_nullArg;
- public static String watson_unknown;
-
- // auto-refresh win32 native
- public static String WM_beginTask;
- public static String WM_errCloseHandle;
- public static String WM_errCreateHandle;
- public static String WM_errFindChange;
- public static String WM_errors;
- public static String WM_jobName;
- public static String WM_nativeErr;
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/utils/WrappedRuntimeException.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/utils/WrappedRuntimeException.java
deleted file mode 100644
index 864584ac953..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/utils/WrappedRuntimeException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.utils;
-
-public class WrappedRuntimeException extends RuntimeException {
-
- /** All serializable objects should have a stable serialVersionUID */
- private static final long serialVersionUID = 1L;
-
- private Throwable target;
-
- public WrappedRuntimeException(Throwable target) {
- super();
- this.target = target;
- }
-
- public Throwable getTargetException() {
- return this.target;
- }
-
- @Override
- public String getMessage() {
- return target.getMessage();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/watson/IElementComparator.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/watson/IElementComparator.java
deleted file mode 100644
index 92568ce6fc3..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/watson/IElementComparator.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.watson;
-
-import org.eclipse.core.internal.dtree.IComparator;
-
-/**
- * This interface allows clients of the element tree to specify how element infos are compared, and
- * thus how element tree deltas are created.
- */
-public interface IElementComparator extends IComparator {
- /** The kinds of changes */
- public int K_NO_CHANGE = 0;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/watson/IPathRequestor.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/watson/IPathRequestor.java
deleted file mode 100644
index 28a14f17d31..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/internal/watson/IPathRequestor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.internal.watson;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Callback interface so visitors can request the path of the object they are visiting. This avoids
- * creating paths when they are not needed.
- */
-public interface IPathRequestor {
- public IPath requestPath();
-
- public String requestName();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/FileInfoMatcherDescription.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/FileInfoMatcherDescription.java
deleted file mode 100644
index 3f3676df2bf..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/FileInfoMatcherDescription.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2017 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-/**
- * A description of a file info matcher.
- *
- * @since 3.6
- */
-public final class FileInfoMatcherDescription {
-
- private String id;
-
- private Object arguments;
-
- public FileInfoMatcherDescription(String id, Object arguments) {
- super();
- this.id = id;
- this.arguments = arguments;
- }
-
- public Object getArguments() {
- return arguments;
- }
-
- public String getId() {
- return id;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((arguments == null) ? 0 : arguments.hashCode());
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- return result;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null) return false;
- if (getClass() != obj.getClass()) return false;
- FileInfoMatcherDescription other = (FileInfoMatcherDescription) obj;
- if (arguments == null) {
- if (other.arguments != null) return false;
- } else if (!arguments.equals(other.arguments)) return false;
- if (id == null) {
- if (other.id != null) return false;
- } else if (!id.equals(other.id)) return false;
- return true;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IBuildConfiguration.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IBuildConfiguration.java
deleted file mode 100644
index d1f7c9d9630..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IBuildConfiguration.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2010,
- * 2011 Broadcom 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Broadcom Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Build Configurations provide a mechanism for orthogonal configuration specific builds within a
- * single project. The resources plugin maintains build deltas per interested builder, per
- * configuration, and allow build configurations to reference each other.
- *
- * All projects have at least one build configuration. By default this has name {@link
- * #DEFAULT_CONFIG_NAME}. One configuration in the project is defined to be 'active'. The active
- * configuration is built by default. If unset, the active configuration defaults to the first
- * configuration in the project.
- *
- * Build configurations are created and set on the project description using: {@link
- * IProjectDescription#setBuildConfigs(String[])}. Build configurations set on Projects must have
- * unique non-null names.
- *
- * When a project is built, a specific configuration is built. This configuration is passed to
- * the builders so they can adapt their behavior appropriately. Builders which don't care about
- * configurations may ignore this, and work as before.
- *
- * Build configuration can reference other builds configurations. These references are created
- * using {@link IWorkspace#newBuildConfig(String, String)}, and set on the referencing project with
- * {@link IProjectDescription#setBuildConfigReferences(String, IBuildConfiguration[])}. A referenced
- * build configuration may have a Workspace build will ensure that the projects are built in an appropriate order as defined by
- * the reference graph.
- *
- * @see IWorkspace#newBuildConfig(String, String)
- * @see IProjectDescription#setActiveBuildConfig(String)
- * @see IProjectDescription#setBuildConfigs(String[])
- * @see IProjectDescription#setBuildConfigReferences(String, IBuildConfiguration[])
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 3.7
- */
-public interface IBuildConfiguration extends IAdaptable {
-
- /** The Id of the default build configuration */
- public static final String DEFAULT_CONFIG_NAME = ""; // $NON-NLS-1$
-
- /** @return the project that the config is for; never null. */
- public IProject getProject();
-
- /**
- * Returns the human readable name of this build configuration. If this {@link
- * IBuildConfiguration} is set on a Project, this can never be null.
- *
- * If this IBuildConfiguration is being used as a reference to a build configuration in another
- * project, this may be null. Such build configuration references are resolved to the current
- * active configuration at build time.
- *
- * @return the name of the configuration; or null if this is a reference to the active
- * configuration
- */
- public String getName();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ICommand.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ICommand.java
deleted file mode 100644
index 87cabae2288..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ICommand.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A builder command names a builder and supplies a table of name-value argument pairs.
- *
- * Changes to a command will only take effect if the modified command is installed into a project
- * description via {@link IProjectDescription#setBuildSpec(ICommand[])}.
- *
- * @see IProjectDescription
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ICommand {
-
- /**
- * Returns a table of the arguments for this command, or By default, build commands respond to all kinds of builds.
- *
- * @param kind One of the *_BUILD constants defined on Individual builders specify their argument expectations.
- *
- * Note that modifications to the arguments of a command being used in a running builder may
- * affect the run of that builder but will not affect any subsequent runs. To change a command
- * permanently you must install the command into the relevant project build spec using {@link
- * IProjectDescription#setBuildSpec(ICommand[])}.
- *
- * @param args a table of command arguments (keys and values must both be of type The builder name comes from the extension that plugs in to the standard When a command is configured to not respond to a given kind of build, the builder instance
- * will not be called when a build of that kind is initiated.
- *
- * This method has no effect if this build command does not allow its build kinds to be
- * configured.
- *
- * Note:
- *
- * Contributors: IBM Corporation - initial API and implementation Serge Beauchamp (Freescale
- * Semiconductor) - [252996] add addFilter/removeFilter/getFilters
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.runtime.*;
-
-/**
- * Interface for resources which may contain other resources (termed its members). While
- * the workspace itself is not considered a container in this sense, the workspace root resource is
- * a container.
- *
- * Containers implement the Note that no attempt is made to exclude team-private member resources as with N.B. Unlike the methods which traffic strictly in resource handles, this method infers the
- * resulting resource's type from the resource existing at the calculated path in the workspace.
- *
- * Note that If the Note that no attempt is made to exclude team-private member resources as with N.B. Unlike the methods which traffic strictly in resource handles, this method infers the
- * resulting resource's type from the resource (or phantom) existing at the calculated path in the
- * workspace.
- *
- * Note that Note that no attempt is made to exclude team-private member resources as with N.B. Unlike the methods which traffic strictly in resource handles, this method infers the
- * resulting resource's type from the resource existing at the calculated path in the workspace.
- *
- * @param path the path of the desired resource
- * @return the member resource, or If the Note that no attempt is made to exclude team-private member resources as with N.B. Unlike the methods which traffic strictly in resource handles, this method infers the
- * resulting resource's type from the resource (or phantom) existing at the calculated path in the
- * workspace.
- *
- * @param path the path of the desired resource
- * @param includePhantoms This is a convenience method, fully equivalent to:
- *
- * Note that this method does not check whether the result is a supported charset name. Callers
- * should be prepared to handle If checkImplicit is If checkImplicit is Note that this method does not check whether the result is a supported charset name. Callers
- * should be prepared to handle This is a resource handle operation; neither the resource nor the result need exist in the
- * workspace. The validation check on the resource name/path is not done when the resource handle
- * is constructed; rather, it is done automatically as the resource is created.
- *
- * The supplied path may be absolute or relative; in either case, it is interpreted as relative
- * to this resource and is appended to this container's full path to form the full path of the
- * resultant resource. A trailing separator is ignored. The path of the resulting resource must
- * have at least two segments.
- *
- * @param path the path of the member file
- * @return the (handle of the) member file
- * @see #getFolder(IPath)
- */
- public IFile getFile(IPath path);
-
- /**
- * Returns a handle to the folder identified by the given path in this container.
- *
- * This is a resource handle operation; neither the resource nor the result need exist in the
- * workspace. The validation check on the resource name/path is not done when the resource handle
- * is constructed; rather, it is done automatically as the resource is created.
- *
- * The supplied path may be absolute or relative; in either case, it is interpreted as relative
- * to this resource and is appended to this container's full path to form the full path of the
- * resultant resource. A trailing separator is ignored. The path of the resulting resource must
- * have at least two segments.
- *
- * @param path the path of the member folder
- * @return the (handle of the) member folder
- * @see #getFile(IPath)
- */
- public IFolder getFolder(IPath path);
-
- /**
- * Returns a list of existing member resources (projects, folders and files) in this resource, in
- * no particular order.
- *
- * This is a convenience method, fully equivalent to Note that the members of a project or folder are the files and folders immediately contained
- * within it. The members of the workspace root are the projects in the workspace.
- *
- * @return an array of members of this resource
- * @exception CoreException if this request fails. Reasons include:
- * This is a convenience method, fully equivalent to:
- *
- * If the If the If the {@link #INCLUDE_HIDDEN} flag is specified in the member flags, hidden members will be
- * included along with the others. If the {@link #INCLUDE_HIDDEN} flag is not specified
- * (recommended), the result will omit any hidden member resources.
- *
- * If the When applied to an existing project resource, this method returns recently deleted files
- * with saved states in that project. Note that local history is maintained with each individual
- * project, and gets discarded when a project is deleted from the workspace. If applied to a
- * deleted project, this method returns the empty list.
- *
- * When applied to the workspace root resource (depth infinity), this method returns all
- * recently deleted files with saved states in all existing projects.
- *
- * When applied to a folder (or project) resource (depth one), this method returns all recently
- * deleted member files with saved states.
- *
- * When applied to a folder resource (depth zero), this method returns an empty list unless
- * there was a recently deleted file with saved states at the same path as the folder.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param depth depth limit: one of This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the encoding of affected resources has been changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param charset a charset string, or The {@link IResource#BACKGROUND_REFRESH} update flag controls when changes to the resource
- * hierarchy under this container resulting from the new filter take effect. If this flag is
- * specified, the resource hierarchy is updated in a separate thread after this method returns. If
- * the flag is not specified, any resource changes resulting from the new filter will occur before
- * this method returns.
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication of any resources that have been removed as a
- * result of the new filter.
- *
- * This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param type ({@link IResourceFilterDescription#INCLUDE_ONLY} or {@link
- * IResourceFilterDescription#EXCLUDE_ALL} and/or {@link
- * IResourceFilterDescription#INHERITABLE})
- * @param matcherDescription the description of the matcher that will determine which {@link
- * IFileInfo} instances will be excluded from the resource tree
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#BACKGROUND_REFRESH})
- * @param monitor a progress monitor, or Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A storage that knows how its contents are encoded.
- *
- * The Clients may implement this interface.
- *
- * @since 3.0
- */
-public interface IEncodedStorage extends IStorage {
- /**
- * Returns the name of a charset encoding to be used when decoding this storage's contents into
- * characters. Returns Note that this method does not check whether the result is a supported charset name. Callers
- * should be prepared to handle Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.net.URI;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-
-/**
- * Files are leaf resources which contain data. The contents of a file resource is stored as a file
- * in the local file system.
- *
- * Files, like folders, may exist in the workspace but not be local; non-local file resources
- * serve as place-holders for files whose content and properties have not yet been fetched from a
- * repository.
- *
- * Files implement the This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's content have been changed.
- *
- * This method is long-running; progress and cancelation are provided by the given progress
- * monitor.
- *
- * @param source an input stream containing the new contents of the file
- * @param force a flag controlling how to deal with resources that are not in sync with the local
- * file system
- * @param keepHistory a flag indicating whether or not to store the current contents in the local
- * history
- * @param monitor a progress monitor, or The If this file is non-local then this method will always fail. The only exception is when
- * The Update flags other than Prior to modifying the contents of this file, the file modification validator (if provided
- * by the VCM plug-in), will be given a chance to perform any last minute preparations. Validation
- * is performed by calling This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's content have been changed.
- *
- * This method is long-running; progress and cancelation are provided by the given progress
- * monitor.
- *
- * @param source an input stream containing the new contents of the file
- * @param updateFlags bit-wise or of update flag constants ( This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the file has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param source an input stream containing the initial contents of the file, or The {@link IResource#FORCE} update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If {@link IResource#FORCE} is
- * not specified, the method will only attempt to write a file in the local file system if it does
- * not already exist. This option ensures there is no unintended data loss; it is the recommended
- * setting. However, if {@link IResource#FORCE} is specified, this method will attempt to write a
- * corresponding file in the local file system, overwriting any existing one if need be.
- *
- * The {@link IResource#DERIVED} update flag indicates that this resource should immediately be
- * set as a derived resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setDerived(boolean)} with a value of The {@link IResource#TEAM_PRIVATE} update flag indicates that this resource should
- * immediately be set as a team private resource. Specifying this flag is equivalent to atomically
- * calling {@link IResource#setTeamPrivateMember(boolean)} with a value of The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the file has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param source an input stream containing the initial contents of the file, or The {@link IResource#ALLOW_MISSING_LOCAL} update flag controls how this method deals with
- * cases where the local file system file to be linked does not exist, or is relative to a
- * workspace path variable that is not defined. If {@link IResource#ALLOW_MISSING_LOCAL} is
- * specified, the operation will succeed even if the local file is missing, or the path is
- * relative to an undefined variable. If {@link IResource#ALLOW_MISSING_LOCAL} is not specified,
- * the operation will fail in the case where the local file system file does not exist or the path
- * is relative to an undefined variable.
- *
- * The {@link IResource#REPLACE} update flag controls how this method deals with cases where a
- * resource of the same name as the prospective link already exists. If {@link IResource#REPLACE}
- * is specified, then the existing linked resource's location is replaced by localLocation's
- * value. This does not cause the underlying file system contents of that resource to be
- * deleted. If {@link IResource#REPLACE} is not specified, this method will fail if an existing
- * resource exists of the same name.
- *
- * The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This method synchronizes this resource with the local file system at the given location.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the file has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param localLocation a file system path where the file should be linked
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#ALLOW_MISSING_LOCAL},
- * {@link IResource#REPLACE} and {@link IResource#HIDDEN})
- * @param monitor a progress monitor, or The The {@link IResource#REPLACE} update flag controls how this method deals with cases where a
- * resource of the same name as the prospective link already exists. If {@link IResource#REPLACE}
- * is specified, then any existing resource with the same name is removed from the workspace to
- * make way for creation of the link. This does not cause the underlying file system
- * contents of that resource to be deleted. If {@link IResource#REPLACE} is not specified, this
- * method will fail if an existing resource exists of the same name.
- *
- * The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This method synchronizes this resource with the file system at the given location.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the file has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param location a file system URI where the file should be linked
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#ALLOW_MISSING_LOCAL},
- * {@link IResource#REPLACE} and {@link IResource#HIDDEN})
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this folder has been removed from its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param keepHistory a flag controlling whether files under this folder should be stored in the
- * workspace's local history
- * @param monitor a progress monitor, or This refinement of the corresponding {@link IEncodedStorage} method is a convenience method,
- * fully equivalent to:
- *
- * Note 1: this method does not check whether the result is a supported charset name.
- * Callers should be prepared to handle Note 2: this method returns a cached value for the encoding that may be out of date
- * if the file is not synchronized with the local file system and the encoding has since changed
- * in the file system.
- *
- * @return the name of a charset
- * @exception CoreException if this method fails. Reasons include:
- * If checkImplicit is If checkImplicit is Note 1: this method does not check whether the result is a supported charset name.
- * Callers should be prepared to handle Note 2: this method returns a cached value for the encoding that may be out of date
- * if the file is not synchronized with the local file system and the encoding has since changed
- * in the file system.
- *
- * @return the name of a charset, or This method uses the following algorithm to determine the charset to be returned:
- *
- * Note: this method does not check whether the result is a supported charset name.
- * Callers should be prepared to handle Calling this method produces a similar effect as calling This refinement of the corresponding {@link IStorage} method is a convenience method
- * returning an open input stream. It's equivalent to:
- *
- * If lightweight auto-refresh is not enabled this method will throw a CoreException when
- * opening out-of-sync resources. The client is responsible for closing the stream when finished.
- *
- * @return an input stream containing the contents of the file
- * @exception CoreException if this method fails. Reasons include:
- * This method attempts to guess the file's character encoding by analyzing the first few bytes
- * of the file. If no identifying pattern is found at the beginning of the file, ENC_UNKNOWN will
- * be returned. This method will not attempt any complex analysis of the file to make a guess at
- * the encoding that is used.
- *
- * @return The character encoding of this file
- * @exception CoreException if this method fails. Reasons include:
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file has been removed from its parent and a new
- * file has been added to the parent of the destination.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param destination the destination path
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param keepHistory a flag controlling whether files under this folder should be stored in the
- * workspace's local history
- * @param monitor a progress monitor, or This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's encoding has changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param newCharset a charset name, or This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's contents have been changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param source an input stream containing the new contents of the file
- * @param force a flag controlling how to deal with resources that are not in sync with the local
- * file system
- * @param keepHistory a flag indicating whether or not store the current contents in the local
- * history
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's content have been changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param source a previous state of this resource
- * @param force a flag controlling how to deal with resources that are not in sync with the local
- * file system
- * @param keepHistory a flag indicating whether or not store the current contents in the local
- * history
- * @param monitor a progress monitor, or The The Update flags other than Prior to modifying the contents of this file, the file modification validator (if provided
- * by the VCM plug-in), will be given a chance to perform any last minute preparations. Validation
- * is performed by calling This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's content have been changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param source an input stream containing the new contents of the file
- * @param updateFlags bit-wise or of update flag constants ( The The Update flags other than Prior to modifying the contents of this file, the file modification validator (if provided
- * by the VCM plug-in), will be given a chance to perform any last minute preparations. Validation
- * is performed by calling This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this file's content have been changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param source a previous state of this resource
- * @param updateFlags bit-wise or of update flag constants ( Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.resources.team.FileModificationValidator;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * The file modification validator is a Team-related hook for pre-checking operations that modify
- * the contents of files.
- *
- * This interface is used only in conjunction with the
- * "org.eclipse.core.resources.fileModificationValidator" extension point. It is intended to be
- * implemented only by the Eclipse Platform Team plug-in.
- *
- * @since 2.0
- * @deprecated clients should subclass {@link FileModificationValidator} instead of implementing
- * this interface
- */
-@Deprecated
-public interface IFileModificationValidator {
- /**
- * Validates that the given files can be modified. The files must all exist in the workspace. The
- * optional context object may be supplied if UI-based validation is required. If the context is
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.io.InputStream;
-import org.eclipse.core.runtime.*;
-
-/**
- * A previous state of a file stored in the workspace's local history.
- *
- * Certain methods for updating, deleting, or moving a file cause the "before" contents of the
- * file to be copied to an internal area of the workspace called the local history area thus
- * providing a limited history of earlier states of a file.
- *
- * Moving or copying a file will cause a copy of its local history to appear at the new location
- * as well as at the original location. Subsequent changes to either file will only affect the local
- * history of the file changed. Deleting a file and creating another one at the same path does not
- * affect the history. If the original file had history, that same history will be available for the
- * new one.
- *
- * The local history does not track resource properties. File states are volatile; the platform
- * does not guarantee that a certain state will always be in the local history.
- *
- * File state objects implement the Note that is used only to give the user a general idea of how old this file state is.
- *
- * @return the time of last modification, in milliseconds since January 1, 1970, 00:00:00 GMT.
- */
- public long getModificationTime();
-
- /**
- * Returns the name of this file state. This refinement of the corresponding Contributors: Serge Beauchamp(Freescale Semiconductor) - initial API and implementation IBM
- * Corporation - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-/**
- * A filter descriptor contains information about a filter type obtained from the plug-in manifest (
- * Filter descriptors are platform-defined objects that exist independent of whether that
- * filter's bundle has been started.
- *
- * @see AbstractFileInfoMatcher
- * @see IWorkspace#getFilterMatcherDescriptor(String)
- * @see IWorkspace#getFilterMatcherDescriptors()
- * @since 3.6
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IFilterMatcherDescriptor {
-
- /**
- * An argument filter type constant (value "filter"), denoting that this filter takes another
- * filter as argument.
- */
- public static final String ARGUMENT_TYPE_FILTER_MATCHER = "filterMatcher"; // $NON-NLS-1$
- /**
- * An argument filter type constant (value "filters"), denoting that this filter takes an array of
- * other filters as argument.
- */
- public static final String ARGUMENT_TYPE_FILTER_MATCHERS = "filterMatchers"; // $NON-NLS-1$
- /**
- * An argument filter type constant (value "none"), denoting that this filter does not take any
- * arguments.
- */
- public static final String ARGUMENT_TYPE_NONE = "none"; // $NON-NLS-1$
- /**
- * An argument filter type constant (value "string"), denoting that this filter takes a string
- * argument
- */
- public static final String ARGUMENT_TYPE_STRING = "string"; // $NON-NLS-1$
-
- /**
- * Returns the argument type expected by this filter. The result will be one of the
- * ARGUMENT_TYPE_* constants declared on this class.
- *
- * @return The argument type of this filter extension
- */
- public abstract String getArgumentType();
-
- /**
- * Returns a translated, human-readable description for this filter extension.
- *
- * @return The human-readable filter description
- */
- public abstract String getDescription();
-
- /**
- * Returns the fully qualified id of the filter extension.
- *
- * @return The fully qualified id of the filter extension.
- */
- public abstract String getId();
-
- /**
- * Returns a translated, human-readable name for this filter extension.
- *
- * @return The human-readable filter name
- */
- public abstract String getName();
-
- /** TODO What is this? */
- public abstract boolean isFirstOrdering();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFolder.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFolder.java
deleted file mode 100644
index 81f1542ae52..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFolder.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation Serge Beauchamp (Freescale
- * Semiconductor) - [229633] Group Support
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-
-/**
- * Folders may be leaf or non-leaf resources and may contain files and/or other folders. A folder
- * resource is stored as a directory in the local file system.
- *
- * Folders, like other resource types, may exist in the workspace but not be local; non-local
- * folder resources serve as place-holders for folders whose properties have not yet been fetched
- * from a repository.
- *
- * Folders implement the This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the folder has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param force a flag controlling how to deal with resources that are not in sync with the local
- * file system
- * @param local a flag controlling whether or not the folder will be local after the creation
- * @param monitor a progress monitor, or The The {@link IResource#DERIVED} update flag indicates that this resource should immediately be
- * set as a derived resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setDerived(boolean)} with a value of The {@link IResource#TEAM_PRIVATE} update flag indicates that this resource should
- * immediately be set as a team private resource. Specifying this flag is equivalent to atomically
- * calling {@link IResource#setTeamPrivateMember(boolean)} with a value of The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This method synchronizes this resource with the local file system.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the folder has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#FORCE}, {@link
- * IResource#DERIVED}, {@link IResource#TEAM_PRIVATE}) and {@link IResource#VIRTUAL})
- * @param local a flag controlling whether or not the folder will be local after the creation
- * @param monitor a progress monitor, or The The {@link IResource#REPLACE} update flag controls how this method deals with cases where a
- * resource of the same name as the prospective link already exists. If {@link IResource#REPLACE}
- * is specified, then the existing linked resource's location is replaced by localLocation's
- * value. This does not cause the underlying file system contents of that resource to be
- * deleted. If {@link IResource#REPLACE} is not specified, this method will fail if an existing
- * resource exists of the same name.
- *
- * The {@link IResource#BACKGROUND_REFRESH} update flag controls how this method synchronizes
- * the new resource with the filesystem. If this flag is specified, resources on disk will be
- * synchronized in the background after the method returns. Child resources of the link may not be
- * available until this background refresh completes. If this flag is not specified, resources are
- * synchronized in the foreground before this method returns.
- *
- * The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the folder has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param localLocation a file system path where the folder should be linked
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#ALLOW_MISSING_LOCAL},
- * {@link IResource#REPLACE}, {@link IResource#BACKGROUND_REFRESH}, and {@link
- * IResource#HIDDEN})
- * @param monitor a progress monitor, or The The {@link IResource#REPLACE} update flag controls how this method deals with cases where a
- * resource of the same name as the prospective link already exists. If {@link IResource#REPLACE}
- * is specified, then any existing resource with the same name is removed from the workspace to
- * make way for creation of the link. This does not cause the underlying file system
- * contents of that resource to be deleted. If {@link IResource#REPLACE} is not specified, this
- * method will fail if an existing resource exists of the same name.
- *
- * The {@link IResource#BACKGROUND_REFRESH} update flag controls how this method synchronizes
- * the new resource with the filesystem. If this flag is specified, resources on disk will be
- * synchronized in the background after the method returns. Child resources of the link may not be
- * available until this background refresh completes. If this flag is not specified, resources are
- * synchronized in the foreground before this method returns.
- *
- * The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the folder has been added to its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param location a file system path where the folder should be linked
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#ALLOW_MISSING_LOCAL},
- * {@link IResource#REPLACE}, {@link IResource#BACKGROUND_REFRESH}, and {@link
- * IResource#HIDDEN})
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this folder has been removed from its parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param keepHistory a flag controlling whether files under this folder should be stored in the
- * workspace's local history
- * @param monitor a progress monitor, or This is a resource handle operation; neither the resource nor the result need exist in the
- * workspace. The validation check on the resource name/path is not done when the resource handle
- * is constructed; rather, it is done automatically as the resource is created.
- *
- * @param name the string name of the member file
- * @return the (handle of the) member file
- * @see #getFolder(String)
- */
- public IFile getFile(String name);
-
- /**
- * Returns a handle to the folder with the given name in this folder.
- *
- * This is a resource handle operation; neither the container nor the result need exist in the
- * workspace. The validation check on the resource name/path is not done when the resource handle
- * is constructed; rather, it is done automatically as the resource is created.
- *
- * @param name the string name of the member folder
- * @return the (handle of the) member folder
- * @see #getFile(String)
- */
- public IFolder getFolder(String name);
-
- /**
- * Moves this resource so that it is located at the given path.
- *
- * This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this folder has been removed from its parent and a
- * new folder has been added to the parent of the destination.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param destination the destination path
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param keepHistory a flag controlling whether files under this folder should be stored in the
- * workspace's local history
- * @param monitor a progress monitor, or Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Markers are a general mechanism for associating notes and meta-data with resources.
- *
- * Markers themselves are handles in the same way as Each marker has:
- *
- * The resources plug-in defines five standard types:
- *
- * Marker types are declared within a multiple inheritance type system. New markers are defined
- * in the All markers declared as Markers implement the This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this marker has been modified.
- *
- * @param attributeName the name of the attribute
- * @param value the value
- * @exception CoreException if this method fails. Reasons include:
- * The attribute value cannot be This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this marker has been modified.
- *
- * @param attributeName the name of the attribute
- * @param value the value, or This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this marker has been modified.
- *
- * @param attributeName the name of the attribute
- * @param value the value
- * @exception CoreException if this method fails. Reasons include:
- * The values of the attributes cannot be This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this marker has been modified.
- *
- * @param attributeNames an array of attribute names
- * @param values an array of attribute values
- * @exception CoreException if this method fails. Reasons include:
- * The values of the attributes cannot be This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this marker has been modified.
- *
- * @param attributes a map of attribute names to attribute values (key type : Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.Map;
-
-/**
- * A marker delta describes the change to a single marker. A marker can either be added, removed or
- * changed. Marker deltas give access to the state of the marker as it was (in the case of deletions
- * and changes) before the modifying operation occurred.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IMarkerDelta {
- /**
- * Returns the object attribute with the given name. The result is an instance of one of the
- * following classes: If kind is If kind is If kind is If kind is If kind is If kind is If kind is If kind is Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Describes a change in a path variable. The change may denote that a variable has been created,
- * deleted or had its value changed.
- *
- * @since 2.1
- * @see IPathVariableChangeListener
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IPathVariableChangeEvent {
-
- /** Event type constant (value = 1) that denotes a value change . */
- public static final int VARIABLE_CHANGED = 1;
-
- /** Event type constant (value = 2) that denotes a variable creation. */
- public static final int VARIABLE_CREATED = 2;
-
- /** Event type constant (value = 3) that denotes a variable deletion. */
- public static final int VARIABLE_DELETED = 3;
-
- /**
- * Returns the variable's current value. If the event type is Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.EventListener;
-
-/**
- * An interface to be implemented by objects interested in path variable creation, removal and value
- * change events.
- *
- * Clients may implement this interface.
- *
- * @since 2.1
- */
-public interface IPathVariableChangeListener extends EventListener {
- /**
- * Notification that a path variable has changed.
- *
- * This method is called when a path variable is added, removed or has its value changed in the
- * observed Contributors: IBM Corporation - initial API and implementation Serge Beauchamp (Freescale
- * Semiconductor) - [229633] Project Path Variable Support
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-
-/**
- * Manages a collection of path variables and resolves paths containing a variable reference.
- *
- * A path variable is a pair of non-null elements (name,value) where name is a case-sensitive
- * string (containing only letters, digits and the underscore character, and not starting with a
- * digit), and value is an absolute Path variables allow for the creation of relative paths whose exact location in the file
- * system depends on the value of a variable. A variable reference may only appear as the first
- * segment of a relative path.
- *
- * @see org.eclipse.core.runtime.IPath
- * @since 2.1
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IPathVariableManager {
-
- /**
- * Converts an absolute path to path relative to some defined variable. For example, converts
- * "C:/foo/bar.txt" into "FOO/bar.txt", granted that the path variable "FOO" value is "C:/foo".
- *
- * The "force" argument will cause an intermediate path variable to be created if the given
- * path can be relative only to a parent of an existing path variable. For example, if the path
- * "C:/other/file.txt" is to be converted and no path variables point to "C:/" or "C:/other" but
- * "FOO" points to "C:/foo", an intermediate "OTHER" variable will be created relative to "FOO"
- * containing the value "${PARENT-1-FOO}" so that the final path returned will be
- * "OTHER/file.txt".
- *
- * The argument "variableHint" can be used to specify the name of the path variable to make the
- * provided path relative to.
- *
- * @param path The absolute path to be converted
- * @param force indicates whether intermediate path variables should be created if the path is
- * relative only to a parent of an existing path variable.
- * @param variableHint The name of the variable to which the path should be made relative to, or
- *
- *
- * If a variable is effectively changed, created or removed by a call to this method,
- * notification will be sent to all registered listeners.
- *
- * @param name the name of the variable
- * @param value the value for the variable (may be
- *
- * If a variable is effectively changed, created or removed by a call to this method,
- * notification will be sent to all registered listeners.
- *
- * @param name the name of the variable
- * @param value the value for the variable (may be If the given URI is If the given path is For example, consider the following collection of path variables:
- *
- * The following paths would be resolved as:
- *
- * c:/bin => c:/bin
- *
- * c:TEMP => c:TEMP
- *
- * /TEMP => /TEMP
- *
- * TEMP => c:/temp
- *
- * TEMP/foo => c:/temp/foo
- *
- * BACKUP => /tmp/backup
- *
- * BACKUP/bar.txt => /tmp/backup/bar.txt
- *
- * SOMEPATH/foo => SOMEPATH/foo
- *
- * @param path the path to be resolved
- * @return the resolved path or Contributors: IBM Corporation - initial API and implementation Francis Lynch (Wind River) -
- * [301563] Save and load tree snapshots Broadcom Corporation - build configurations and references
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.content.IContentTypeMatcher;
-
-/**
- * A project is a type of resource which groups resources into buildable, reusable units.
- *
- * Features of projects include:
- *
- * Projects implement the The builder name is declared in the extension that plugs in to the standard This method may change resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param kind the kind of build being requested. Valid values are:
- * Building a project involves executing the commands found in this project's build spec. The
- * build is run for the project's active build configuration.
- *
- * This method may change resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param kind the kind of build being requested. Valid values are:
- * Building a project involves executing the commands found in this project's build spec. The
- * build is run for the specific project build configuration.
- *
- * This method may change resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param config build configuration to build
- * @param kind the kind of build being requested. Valid values are:
- * Closing a project involves ensuring that all important project-related state is safely
- * stored on disk, and then discarding the in-memory representation of its resources and other
- * volatile state, including session properties. After this method, the project continues to exist
- * in the workspace but its member resources (and their members, etc.) do not. A closed project
- * can later be re-opened.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that includes an indication that this project has been closed and its members have
- * been removed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or Newly created projects have no session or persistent properties.
- *
- * If the project content area given in the project description does not contain a project
- * description file, a project description file is written in the project content area with the
- * natures, build spec, comment, and referenced projects as specified in the given project
- * description. If there is an existing project description file, it is not overwritten. In either
- * case, this method does not cause natures to be configured.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the project has been added to the workspace.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the project description
- * @param monitor a progress monitor, or Newly created projects have no session or persistent properties.
- *
- * If the project content area does not contain a project description file, an initial project
- * description file is written in the project content area with the following information:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that this project has been added to the workspace.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or Newly created projects have no session or persistent properties.
- *
- * If the project content area given in the project description does not contain a project
- * description file, a project description file is written in the project content area with the
- * natures, build spec, comment, and referenced projects as specified in the given project
- * description. If there is an existing project description file, it is not overwritten. In either
- * case, this method does not cause natures to be configured.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the project has been added to the workspace.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * The {@link IResource#HIDDEN} update flag indicates that this resource should immediately be
- * set as a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * IResource#setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * @param description the project description
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param deleteContent a flag controlling how whether content is aggressively deleted
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or If at any point the active configuration is removed from the project, for example when
- * updating the list of build configurations, the active build configuration will be set to the
- * first build configuration specified by {@link IProjectDescription#setBuildConfigs(String[])}.
- *
- * If all of the build configurations are removed, the active build configuration will be set
- * to the default configuration.
- *
- * @return the active build configuration
- * @exception CoreException if this method fails. Reasons include:
- * This is a resource handle operation; neither the resource nor the result need exist in the
- * workspace. The validation check on the resource name/path is not done when the resource handle
- * is constructed; rather, it is done automatically as the resource is created.
- *
- * @param name the string name of the member file
- * @return the (handle of the) member file
- * @see #getFolder(String)
- */
- public IFile getFile(String name);
-
- /**
- * Returns a handle to the folder with the given name in this project.
- *
- * This is a resource handle operation; neither the container nor the result need exist in the
- * workspace. The validation check on the resource name/path is not done when the resource handle
- * is constructed; rather, it is done automatically as the resource is created.
- *
- * @param name the string name of the member folder
- * @return the (handle of the) member folder
- * @see #getFile(String)
- */
- public IFolder getFolder(String name);
-
- /**
- * Returns the specified project nature for this project or This may cause the plug-in that provides the given nature to be activated.
- *
- * @param natureId the fully qualified nature extension identifier, formed by combining the nature
- * extension id with the id of the declaring plug-in. (e.g. The content, structure, and management of this area is the responsibility of the plug-in.
- * This area is deleted when the project is deleted.
- *
- * This project needs to exist but does not need to be open.
- *
- * @param plugin the plug-in
- * @return a local file system path
- * @deprecated Use The content, structure, and management of this area is the responsibility of the
- * bundle/plug-in. This area is deleted when the project is deleted.
- *
- * This project needs to exist but does not need to be open.
- *
- * @param id the bundle or plug-in's identifier
- * @return a local file system path
- * @since 3.0
- */
- public IPath getWorkingLocation(String id);
-
- /**
- * Returns the projects referenced by this project. This includes both the static and dynamic
- * references of this project. The returned projects need not exist in the workspace. The result
- * will not contain duplicates. Returns an empty array if there are no referenced projects.
- *
- * @return a list of projects
- * @exception CoreException if this method fails. Reasons include:
- * This includes both the static and dynamic project level references. These are converted to
- * build configurations pointing at the currently active referenced project configuration. The
- * result will not contain duplicates.
- *
- * References to active configurations will be translated to references to actual build
- * configurations, if the project is accessible. Note that if includeMissing is true
- * BuildConfigurations which can't be resolved (i.e. exist on missing projects, or aren't listed
- * on the referenced project) are still included in the returned IBuildConfiguration array.
- *
- * Returns an empty array if there are no references.
- *
- * @param configName the configuration to get the references for
- * @param includeMissing boolean controls whether unresolved buildConfiguration should be included
- * in the result
- * @return an array of project build configurations
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- * A project must be opened before it can be manipulated. A closed project is passive and has a
- * minimal memory footprint; a closed project has no members.
- *
- * @return This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource has been removed from its parent
- * and that a corresponding resource has been added to its new parent. Additional information
- * provided with resource delta shows that these additions and removals are related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the description for the destination project
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or Opening a project constructs an in-memory representation of its resources from information
- * stored on disk.
- *
- * When a project is opened for the first time, initial information about the project's
- * existing resources can be obtained in the following ways:
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to This method changes resources; these changes will be reported in a subsequent resource
- * change event that includes an indication that the project has been opened and its resources
- * have been added to the tree.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method requires the {@link IWorkspaceRoot} scheduling rule.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the project's content has changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the project description
- * @param monitor a progress monitor, or The given project description is used to change the project's natures, build spec, comment,
- * and referenced projects. The name and location of a project cannot be changed using this
- * method; these settings in the project description are ignored. To change a project's name or
- * location, use {@link IResource#move(IProjectDescription, int, IProgressMonitor)}. The project's
- * session and persistent properties are not affected.
- *
- * If the new description includes nature ids of natures that the project did not have before,
- * these natures will be configured in automatically, which involves instantiating the project
- * nature and calling {@link IProjectNature#configure()} on it. An internal reference to the
- * nature object is retained, and will be returned on subsequent calls to The The The The scheduling rule required for this operation depends on the Update flags other than Prior to modifying the project description file, the file modification validator (if
- * provided by the Team plug-in), will be given a chance to perform any last minute preparations.
- * Validation is performed by calling This method changes resources; these changes will be reported in a subsequent resource
- * change event, including an indication that the project's content has changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the project description
- * @param updateFlags bit-wise or of update flag constants ( Contributors: IBM Corporation - initial API and implementation Broadcom Corporation - build
- * configurations and references
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A project description contains the meta-data required to define a project. In effect, a project
- * description is a project's "content".
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IProjectDescription {
- /**
- * Constant that denotes the name of the project description file (value These references are persisted by the workspace in a private location outside the project
- * description file, and as such will not be shared when a project is exported or persisted in a
- * repository. As such clients are always responsible for setting these references when a project
- * is created or recreated.
- *
- * The referenced build configurations need not exist in the workspace. The result will not
- * contain duplicates. The order of the references is preserved from the call to {@link
- * #setBuildConfigReferences(String, IBuildConfiguration[])}. Returns an empty array if the
- * provided config doesn't dynamically reference any other build configurations, or the given
- * config does not exist in this description.
- *
- * @param configName the configuration in the described project to get the references for
- * @return a list of dynamic build configurations
- * @see #setBuildConfigReferences(String, IBuildConfiguration[])
- * @since 3.7
- */
- public IBuildConfiguration[] getBuildConfigReferences(String configName);
-
- /**
- * Returns the list of build commands to run when building the described project. The commands are
- * listed in the order in which they are to be run.
- *
- * @return the list of build commands for the described project
- */
- public ICommand[] getBuildSpec();
-
- /**
- * Returns the descriptive comment for the described project.
- *
- * @return the comment for the described project
- */
- public String getComment();
-
- /**
- * Returns the dynamic project references for the described project. Dynamic project references
- * can be used instead of simple project references in cases where the reference information is
- * computed dynamically be a third party. These references are persisted by the workspace in a
- * private location outside the project description file, and as such will not be shared when a
- * project is exported or persisted in a repository. A client using project references is always
- * responsible for setting these references when a project is created or recreated.
- *
- * The returned projects need not exist in the workspace. The result will not contain
- * duplicates. Returns an empty array if there are no dynamic project references on this
- * description.
- *
- * @see #getBuildConfigReferences(String)
- * @see #getReferencedProjects()
- * @see #setDynamicReferences(IProject[])
- * @return a list of projects
- * @since 3.0
- */
- public IProject[] getDynamicReferences();
-
- /**
- * Returns the local file system location for the described project. The path will be either an
- * absolute file system path, or a relative path whose first segment is the name of a workspace
- * path variable. The projects need not exist in the workspace. The result will not contain duplicates.
- * Returns an empty array if there are no referenced projects on this description.
- *
- * @see #getDynamicReferences()
- * @see #getBuildConfigReferences(String)
- * @return a list of projects
- */
- public IProject[] getReferencedProjects();
-
- /**
- * Returns whether the project nature specified by the given nature extension id has been added to
- * the described project.
- *
- * @param natureId the nature extension identifier
- * @return Note that the new command does not become part of this project description's build spec
- * until it is installed via the If a configuration with the specified name does not exist in the project then the first
- * configuration in the project is treated as the active configuration.
- *
- * @param configName the configuration to set as the active or default
- * @since 3.7
- */
- public void setActiveBuildConfig(String configName);
-
- /**
- * Sets the build configurations for the described project.
- *
- * The passed in names must all be non-null. Before they are set, duplicates are removed.
- *
- * All projects have one default build configuration, and it is impossible to configure the
- * project to have no build configurations. If the input is null or an empty list, the current
- * configurations are removed, and a default build configuration is (re-)added.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @param configNames the configurations to set for the described project
- * @see IProject#getActiveBuildConfig()
- * @see IProject#getBuildConfigs()
- * @see IProjectDescription#setActiveBuildConfig(String)
- * @since 3.7
- */
- public void setBuildConfigs(String[] configNames);
-
- /**
- * Sets the build configurations referenced by the specified configuration.
- *
- * The configuration to which references are being added needs to exist in this description,
- * but the referenced projects and build configurations need not exist. A reference with References at the build configuration level take precedence over references at the project
- * level.
- *
- * Like dynamic references, these build configuration references are persisted as part of
- * workspace metadata.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @see #getBuildConfigReferences(String)
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @param configName the configuration in the described project to set the references for
- * @param references list of build configuration references
- * @since 3.7
- */
- public void setBuildConfigReferences(String configName, IBuildConfiguration[] references);
-
- /**
- * Sets the list of build command to run when building the described project.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @param buildSpec the array of build commands to run
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @see #getBuildSpec()
- * @see #newCommand()
- */
- public void setBuildSpec(ICommand[] buildSpec);
-
- /**
- * Sets the comment for the described project.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @param comment the comment for the described project
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @see #getComment()
- */
- public void setComment(String comment);
-
- /**
- * Sets the dynamic project references for the described project. The projects need not exist in
- * the workspace. Duplicates will be removed.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @see #getDynamicReferences()
- * @see #setBuildConfigReferences(String, IBuildConfiguration[])
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @param projects list of projects
- * @since 3.0
- */
- public void setDynamicReferences(IProject[] projects);
-
- /**
- * Sets the local file system location for the described project. The path must be either an
- * absolute file system path, or a relative path whose first segment is the name of a defined
- * workspace path variable. If Setting the location on a description for a project which already exists has no effect; the
- * new project location is ignored when the description is set on the already existing project.
- * This method is intended for use on descriptions for new projects or for destination projects
- * for This operation maps the root folder of the project to the exact location provided. For
- * example, if the location for project named "P" is set to the path c:\my_plugins\Project1, the
- * file resource at workspace path /P/index.html would be stored in the local file system at
- * c:\my_plugins\Project1\index.html.
- *
- * @param location the location for the described project or Setting the location on a description for a project which already exists has no effect; the
- * new project location is ignored when the description is set on the already existing project.
- * This method is intended for use on descriptions for new projects or for destination projects
- * for This operation maps the root folder of the project to the exact location provided. For
- * example, if the location for project named "P" is set to the URI file://c:/my_plugins/Project1,
- * the file resource at workspace path /P/index.html would be stored in the local file system at
- * file://c:/my_plugins/Project1/index.html.
- *
- * @param location the location for the described project or Setting the name on a description and then setting the description on the project has no
- * effect; the new name is ignored.
- *
- * Creating a new project with a description name which doesn't match the project handle name
- * results in the description name being ignored; the project will be created using the name in
- * the handle.
- *
- * @param projectName the name of the described project
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @see #getName()
- */
- public void setName(String projectName);
-
- /**
- * Sets the list of natures associated with the described project. A project created with this
- * description will have these natures added to it in the given order.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @param natures the list of natures
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @see #getNatureIds()
- */
- public void setNatureIds(String[] natures);
-
- /**
- * Sets the referenced projects, ignoring any duplicates. The order of projects is preserved. The
- * projects need not exist in the workspace.
- *
- * Users must call {@link IProject#setDescription(IProjectDescription, int, IProgressMonitor)}
- * before changes made to this description take effect.
- *
- * @param projects a list of projects
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @see #setBuildConfigReferences(String, IBuildConfiguration[])
- * @see #getReferencedProjects()
- */
- public void setReferencedProjects(IProject[] projects);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectNature.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectNature.java
deleted file mode 100644
index 25d064f041b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectNature.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Interface for project nature runtime classes. It can configure a project with the project nature,
- * or de-configure it. When a project is configured with a project nature, this is recorded in the
- * list of project natures on the project. Individual project natures may expose a more specific
- * runtime type, with additional API for manipulating the project in a nature-specific way.
- *
- * Clients may implement this interface.
- *
- * @see IProject#getNature(String)
- * @see IProject#hasNature(String)
- * @see IProjectDescription#getNatureIds()
- * @see IProjectDescription#hasNature(String)
- * @see IProjectDescription#setNatureIds(String[])
- */
-public interface IProjectNature {
- /**
- * Configures this nature for its project. This is called by the workspace when natures are added
- * to the project using Exceptions thrown by this method will be propagated back to the caller of Exceptions thrown by this method will be propagated back to the caller of Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-/**
- * A project nature descriptor contains information about a project nature obtained from the plug-in
- * manifest ( Nature descriptors are platform-defined objects that exist independent of whether that
- * nature's plug-in has been started. In contrast, a project nature's runtime object ( The nature identifier is composed of the nature's plug-in id and the simple id of the nature
- * extension. For example, if plug-in Note that any translation specified in the plug-in manifest file is automatically applied.
- *
- * @return a displayable string label for this nature, possibly the empty string
- */
- public String getLabel();
-
- /**
- * Returns the unique identifiers of the natures required by this nature. Nature requirements are
- * specified by the Contributors: IBM Corporation - initial API and implementation Red Hat Incorporated -
- * get/setResourceAttribute code Oakland Software Incorporated - added getSessionProperties and
- * getPersistentProperties Serge Beauchamp (Freescale Semiconductor) - [252996] add hasFilters()
- * Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * The workspace analog of file system files and directories. There are exactly four types of
- * resource: files, folders, projects and the workspace root.
- *
- * File resources are similar to files in that they hold data directly. Folder resources are
- * analogous to directories in that they hold other resources but cannot directly hold data. Project
- * resources group files and folders into reusable clusters. The workspace root is the top level
- * resource under which all others reside.
- *
- * Features of resources:
- *
- * Resources implement the Deleting a project that is open ordinarily deletes all its files and folders, whereas
- * deleting a project that is closed retains its files and folders. Specifying Deleting a project that is open ordinarily deletes all its files and folders, whereas
- * deleting a project that is closed retains its files and folders. Specifying Example usage: The entire subtree under the given resource is traversed to infinite depth, unless the
- * visitor ignores a subtree by returning This is a convenience method, fully equivalent to No guarantees are made about the behavior of this method if resources are deleted or added
- * during the traversal of this resource hierarchy. If resources are deleted during the traversal,
- * they may still be passed to the visitor; if resources are created, they may not be passed to
- * the visitor. If resources other than the one being visited are modified during the traversal,
- * the resource proxy may contain stale information when that resource is visited.
- *
- * If the {@link IContainer#INCLUDE_PHANTOMS} flag is not specified in the member flags
- * (recommended), only member resources that exist will be visited. If the {@link
- * IContainer#INCLUDE_PHANTOMS} flag is specified, the visit will also include any phantom member
- * resource that the workspace is keeping track of.
- *
- * If the {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} flag is not specified (recommended),
- * team private members will not be visited. If the {@link
- * IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} flag is specified in the member flags, team private
- * member resources are visited as well.
- *
- * If the {@link IContainer#INCLUDE_HIDDEN} flag is not specified (recommended), hidden
- * resources will not be visited. If the {@link IContainer#INCLUDE_HIDDEN} flag is specified in
- * the member flags, hidden resources are visited as well.
- *
- * If the {@link IContainer#DO_NOT_CHECK_EXISTENCE} flag is not specified (recommended), the
- * resource is checked for existence before the visitor's The entire subtree under the given resource is traversed to the supplied depth, unless the
- * visitor ignores a subtree by returning No guarantees are made about the behavior of this method if resources are deleted or added
- * during the traversal of this resource hierarchy. If resources are deleted during the traversal,
- * they may still be passed to the visitor; if resources are created, they may not be passed to
- * the visitor. If resources other than the one being visited are modified during the traversal,
- * the resource proxy may contain stale information when that resource is visited.
- *
- * If the {@link IContainer#INCLUDE_PHANTOMS} flag is not specified in the member flags
- * (recommended), only member resources that exist will be visited. If the {@link
- * IContainer#INCLUDE_PHANTOMS} flag is specified, the visit will also include any phantom member
- * resource that the workspace is keeping track of.
- *
- * If the {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} flag is not specified (recommended),
- * team private members will not be visited. If the {@link
- * IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} flag is specified in the member flags, team private
- * member resources are visited as well.
- *
- * If the {@link IContainer#INCLUDE_HIDDEN} flag is not specified (recommended), hidden
- * resources will not be visited. If the {@link IContainer#INCLUDE_HIDDEN} flag is specified in
- * the member flags, hidden resources are visited as well.
- *
- * If the {@link IContainer#DO_NOT_CHECK_EXISTENCE} flag is not specified (recommended), the
- * resource is checked for existence before the visitor's This is a convenience method, fully equivalent to The subtree under the given resource is traversed to the supplied depth.
- *
- * This is a convenience method, fully equivalent to:
- *
- * The subtree under the given resource is traversed to the supplied depth.
- *
- * No guarantees are made about the behavior of this method if resources are deleted or added
- * during the traversal of this resource hierarchy. If resources are deleted during the traversal,
- * they may still be passed to the visitor; if resources are created, they may not be passed to
- * the visitor.
- *
- * If the {@link IContainer#INCLUDE_PHANTOMS} flag is not specified in the member flags
- * (recommended), only member resources that exists are visited. If the {@link
- * IContainer#INCLUDE_PHANTOMS} flag is specified, the visit also includes any phantom member
- * resource that the workspace is keeping track of.
- *
- * If the {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} flag is not specified (recommended),
- * team private members are not visited. If the {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS}
- * flag is specified in the member flags, team private member resources are visited as well.
- *
- * If the {@link IContainer#EXCLUDE_DERIVED} flag is not specified (recommended), derived
- * resources are visited. If the {@link IContainer#EXCLUDE_DERIVED} flag is specified in the
- * member flags, derived resources are not visited.
- *
- * If the {@link IContainer#INCLUDE_HIDDEN} flag is not specified (recommended), hidden
- * resources will not be visited. If the {@link IContainer#INCLUDE_HIDDEN} flag is specified in
- * the member flags, hidden resources are visited as well.
- *
- * If the {@link IContainer#DO_NOT_CHECK_EXISTENCE} flag is not specified (recommended), the
- * resource is checked for existence before the visitor's This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource copy has been added to its new
- * parent.
- *
- * This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param destination the destination path
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or The supplied path may be absolute or relative. Absolute paths fully specify the new location
- * for the resource, including its project. Relative paths are considered to be relative to the
- * container of the resource being copied. A trailing separator is ignored.
- *
- * Calling this method with a one segment absolute destination path is equivalent to calling:
- *
- * When a resource is copied, its persistent properties are copied with it. Session properties
- * and markers are not copied.
- *
- * The The The {@link #DERIVED} update flag indicates that the new resource should immediately be set
- * as a derived resource. Specifying this flag is equivalent to atomically calling {@link
- * #setDerived(boolean)} with a value of The {@link #TEAM_PRIVATE} update flag indicates that the new resource should immediately be
- * set as a team private resource. Specifying this flag is equivalent to atomically calling {@link
- * #setTeamPrivateMember(boolean)} with a value of The {@link #HIDDEN} update flag indicates that the new resource should immediately be set as
- * a hidden resource. Specifying this flag is equivalent to atomically calling {@link
- * #setHidden(boolean)} with a value of Update flags other than those listed above are ignored.
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource copy has been added to its new
- * parent.
- *
- * An attempt will be made to copy the local history for this resource and its children, to the
- * destination. Since local history existence is a safety-net mechanism, failure of this action
- * will not result in automatic failure of the copy operation.
- *
- * This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param destination the destination path
- * @param updateFlags bit-wise or of update flag constants ({@link #FORCE}, {@link #SHALLOW},
- * {@link #DERIVED}, {@link #TEAM_PRIVATE}, {@link #HIDDEN})
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource copy has been added to its new
- * parent.
- *
- * This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the destination project description
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or When a resource is copied, its persistent properties are copied with it. Session properties
- * and markers are not copied.
- *
- * The The Update flags other than An attempt will be made to copy the local history for this resource and its children, to the
- * destination. Since local history existence is a safety-net mechanism, failure of this action
- * will not result in automatic failure of the copy operation.
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource copy has been added to its new
- * parent.
- *
- * This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the destination project description
- * @param updateFlags bit-wise or of update flag constants ( Note that once a proxy has been created, it does not stay in sync with the corresponding
- * resource. Changes to the resource after the proxy is created will not be reflected in the state
- * of the proxy.
- *
- * @return A proxy representing this resource
- * @since 3.2
- */
- public IResourceProxy createProxy();
-
- /**
- * Deletes this resource from the workspace.
- *
- * This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or Deleting a non-linked resource also deletes its contents from the local file system. In the
- * case of a file or folder resource, the corresponding file or directory in the local file system
- * is deleted. Deleting an open project recursively deletes its members; deleting a closed project
- * just gets rid of the project itself (closed projects have no members); files in the project's
- * local content area are retained; referenced projects are unaffected.
- *
- * Deleting a linked resource does not delete its contents from the file system, it just
- * removes that resource and its children from the workspace. Deleting children of linked
- * resources does remove the contents from the file system.
- *
- * Deleting a resource also deletes its session and persistent properties and markers.
- *
- * Deleting a non-project resource which has sync information converts the resource to a
- * phantom and retains the sync information for future use.
- *
- * Deleting the workspace root resource recursively deletes all projects, and removes all
- * markers, properties, sync info and other data related to the workspace root; the root resource
- * itself is not deleted, however.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * The {@link #FORCE} update flag controls how this method deals with cases where the workspace
- * is not completely in sync with the local file system. If {@link #FORCE} is not specified, the
- * method will only attempt to delete files and directories in the local file system that
- * correspond to, and are in sync with, resources in the workspace; it will fail if it encounters
- * a file or directory in the file system that is out of sync with the workspace. This option
- * ensures there is no unintended data loss; it is the recommended setting. However, if {@link
- * #FORCE} is specified, the method will ruthlessly attempt to delete corresponding files and
- * directories in the local file system, including ones that have been recently updated or
- * created.
- *
- * The {@link #KEEP_HISTORY} update flag controls whether or not files that are about to be
- * deleted from the local file system have their current contents saved in the workspace's local
- * history. The local history mechanism serves as a safety net to help the user recover from
- * mistakes that might otherwise result in data loss. Specifying {@link #KEEP_HISTORY} is
- * recommended except in circumstances where past states of the files are of no conceivable
- * interest to the user. Note that local history is maintained with each individual project, and
- * gets discarded when a project is deleted from the workspace. Hence {@link #KEEP_HISTORY} is
- * only really applicable when deleting files and folders, but not projects.
- *
- * The {@link #ALWAYS_DELETE_PROJECT_CONTENT} update flag controls how project deletions are
- * handled. If {@link #ALWAYS_DELETE_PROJECT_CONTENT} is specified, then the files and folders in
- * a project's local content area are deleted, regardless of whether the project is open or
- * closed; {@link #FORCE} is assumed regardless of whether it is specified. If {@link
- * #NEVER_DELETE_PROJECT_CONTENT} is specified, then the files and folders in a project's local
- * content area are retained, regardless of whether the project is open or closed; the {@link
- * #FORCE} flag is ignored. If neither of these flags is specified, files and folders in a
- * project's local content area from open projects (subject to the {@link #FORCE} flag), but never
- * from closed projects.
- *
- * @param updateFlags bit-wise or of update flag constants ( {@link #FORCE}, {@link
- * #KEEP_HISTORY}, {@link #ALWAYS_DELETE_PROJECT_CONTENT}, and {@link
- * #NEVER_DELETE_PROJECT_CONTENT})
- * @param monitor a progress monitor, or This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * @param type the type of marker to consider, or Note that no resources ever exist under a project that is closed; opening a project may
- * bring some resources into existence.
- *
- * The name and path of a resource handle may be invalid. However, validation checks are done
- * automatically as a resource is created; this means that any resource that exists can be safely
- * assumed to have a valid name and path.
- *
- * @return The file extension portion is defined as the string following the last period (".")
- * character in the name. If there is no period in the name, the path has no file extension
- * portion. If the name ends in a period, the file extension portion is the empty string.
- *
- * This is a resource handle operation; the resource need not exist.
- *
- * @return a string file extension
- * @see #getName()
- */
- public String getFileExtension();
-
- /**
- * Returns the full, absolute path of this resource relative to the workspace.
- *
- * This is a resource handle operation; the resource need not exist. If this resource does
- * exist, its path can be safely assumed to be valid.
- *
- * A resource's full path indicates the route from the root of the workspace to the resource.
- * Within a workspace, there is exactly one such path for any given resource. The first segment of
- * these paths name a project; remaining segments, folders and/or files within that project. The
- * returned path never has a trailing separator. The path of the workspace root is Since absolute paths contain the name of the project, they are vulnerable when the project
- * is renamed. For most situations, project-relative paths are recommended over absolute paths.
- *
- * @return the absolute path of this resource
- * @see #getProjectRelativePath()
- * @see Path#ROOT
- */
- public IPath getFullPath();
-
- /**
- * Returns a cached value of the local time stamp on disk for this resource, or Note that due to varying file system timing granularities, this value is not guaranteed to
- * change every time the file is modified. For a more reliable indication of whether the file has
- * changed, use If this resource is the workspace root, this method returns the absolute local file system
- * path of the platform working area.
- *
- * If this resource is a project that exists in the workspace, this method returns the path to
- * the project's local content area. This is true regardless of whether the project is open or
- * closed. This value will be null in the case where the location is relative to an undefined
- * workspace path variable.
- *
- * If this resource is a linked resource under a project that is open, this method returns the
- * resolved path to the linked resource's local contents. This value will be null in the case
- * where the location is relative to an undefined workspace path variable.
- *
- * If this resource is a file or folder under a project that exists, or a linked resource under
- * a closed project, this method returns a (non- If this resource is a project that does not exist in the workspace, or a file or folder
- * below such a project, this method returns If this resource is the workspace root, this method returns the absolute location of the
- * platform working area.
- *
- * If this resource is a project that exists in the workspace, this method returns the URI to
- * the project's local content area. This is true regardless of whether the project is open or
- * closed. This value will be null in the case where the location is relative to an undefined
- * workspace path variable.
- *
- * If this resource is a linked resource under a project that is open, this method returns the
- * resolved URI to the linked resource's local contents. This value will be null in the case where
- * the location is relative to an undefined workspace path variable.
- *
- * If this resource is a file or folder under a project that exists, or a linked resource under
- * a closed project, this method returns a (non- If this resource is a project that does not exist in the workspace, or a file or folder
- * below such a project, this method returns A resource's modification stamp gets updated each time a resource is modified. If a
- * resource's modification stamp is the same, the resource has not changed. Conversely, if a
- * resource's modification stamp is different, some aspect of it (other than properties) has been
- * modified at least once (possibly several times). Resource modification stamps are preserved
- * across project close/re-open, and across workspace shutdown/restart. The magnitude or sign of
- * the numerical difference between two modification stamps is not significant.
- *
- * The following things affect a resource's modification stamp:
- *
- * This is a resource handle operation; the resource need not exist.
- *
- * If this resource exists, its name can be safely assumed to be valid.
- *
- * @return the name of the resource
- * @see #getFullPath()
- * @see #getProjectRelativePath()
- */
- public String getName();
-
- /**
- * Returns the path variable manager for this resource.
- *
- * @return the path variable manager
- * @see IPathVariableManager
- * @since 3.6
- */
- public IPathVariableManager getPathVariableManager();
-
- /**
- * Returns the resource which is the parent of this resource, or The full path of the parent resource is the same as this resource's full path with the last
- * segment removed.
- *
- * This is a resource handle operation; neither the resource nor the resulting resource need
- * exist.
- *
- * @return the parent resource of this resource, or A resource's project is the one named by the first segment of its full path.
- *
- * This is a resource handle operation; neither the resource nor the resulting project need
- * exist.
- *
- * @return the project handle
- */
- public IProject getProject();
-
- /**
- * Returns a relative path of this resource with respect to its project. Returns the empty path
- * for projects and the workspace root.
- *
- * This is a resource handle operation; the resource need not exist. If this resource does
- * exist, its path can be safely assumed to be valid.
- *
- * A resource's project-relative path indicates the route from the project to the resource.
- * Within a project, there is exactly one such path for any given resource. The returned path
- * never has a trailing slash.
- *
- * Project-relative paths are recommended over absolute paths, since the former are not
- * affected if the project is renamed.
- *
- * @return the relative path of this resource with respect to its project
- * @see #getFullPath()
- * @see #getProject()
- * @see Path#EMPTY
- */
- public IPath getProjectRelativePath();
-
- /**
- * Returns the file system location of this resource, or If this resource is an existing project, the returned path will be equal to the location
- * path in the project description. If this resource is a linked resource in an open project, the
- * returned path will be equal to the location path supplied when the linked resource was created.
- * In all other cases, this method returns the same value as {@link #getLocation()}.
- *
- * @return the raw path of this resource in the local file system, or If this resource is an existing project, the returned location will be equal to the location
- * URI in the project description. If this resource is a linked resource in an open project, the
- * returned location will be equal to the location URI supplied when the linked resource was
- * created. In all other cases, this method returns the same value as {@link #getLocationURI()}.
- *
- * @return the raw location of this resource, or Reasons for a Attributes that are not supported by the underlying file system will have a value of Sample usage:
- *
- * This is a resource handle operation; the resource need not exist in the workspace.
- *
- * @return the type of this resource
- * @see #FILE
- * @see #FOLDER
- * @see #PROJECT
- * @see #ROOT
- */
- public int getType();
-
- /**
- * Returns the workspace which manages this resource.
- *
- * This is a resource handle operation; the resource need not exist in the workspace.
- *
- * @return the workspace
- */
- public IWorkspace getWorkspace();
-
- /**
- * Returns whether this resource is accessible. For files and folders, this is equivalent to
- * existing; for projects, this is equivalent to existing and being open. The workspace root is
- * always accessible.
- *
- * @return This is a convenience method, fully equivalent to The {@link #CHECK_ANCESTORS} option flag indicates whether this method should consider
- * ancestor resources in its calculation. If the {@link #CHECK_ANCESTORS} flag is present, this
- * method will return This operation is not related to the file system hidden attribute accessible using {@link
- * ResourceAttributes#isHidden()}.
- *
- * @return This operation is not related to the file system hidden attribute accessible using {@link
- * ResourceAttributes#isHidden()}.
- *
- * The {@link #CHECK_ANCESTORS} option flag indicates whether this method should consider
- * ancestor resources in its calculation. If the {@link #CHECK_ANCESTORS} flag is present, this
- * method will return This is a convenience method, fully equivalent to This method returns true for a resource that has been linked using the The {@link #CHECK_ANCESTORS} option flag indicates whether this method should consider
- * ancestor resources in its calculation. If the {@link #CHECK_ANCESTORS} flag is present, this
- * method will return When a resource is not local, its content and properties are unavailable for both reading
- * and writing.
- *
- * @param depth valid values are The workspace uses phantom resources to remember outgoing deletions and incoming additions
- * relative to an external synchronization partner. Phantoms appear and disappear automatically as
- * a byproduct of synchronization. Since the workspace root cannot be synchronized in this way, it
- * is never a phantom. Projects are also never phantoms.
- *
- * The key point is that phantom resources do not exist (in the technical sense of A resource is considered to be in sync if all of the following conditions are true:
- *
- * This operation interrogates files and folders in the local file system; depending on the
- * speed of the local file system and the requested depth, this operation may be time-consuming.
- *
- * @param depth the depth (one of The {@link #CHECK_ANCESTORS} option flag indicates whether this method should consider
- * ancestor resources in its calculation. If the {@link #CHECK_ANCESTORS} flag is present, this
- * method will return This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource has been removed from its parent
- * and that a corresponding resource has been added to its new parent. Additional information
- * provided with resource delta shows that these additions and removals are related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param destination the destination path
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or The supplied path may be absolute or relative. Absolute paths fully specify the new location
- * for the resource, including its project. Relative paths are considered to be relative to the
- * container of the resource being moved. A trailing slash is ignored.
- *
- * Calling this method with a one segment absolute destination path is equivalent to calling:
- *
- * When a resource moves, its session and persistent properties move with it. Likewise for all
- * other attributes of the resource including markers.
- *
- * The The If this resource is not a project, an attempt will be made to copy the local history for
- * this resource and its children, to the destination. Since local history existence is a
- * safety-net mechanism, failure of this action will not result in automatic failure of the move
- * operation.
- *
- * The Update flags other than This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource has been removed from its parent
- * and that a corresponding resource has been added to its new parent. Additional information
- * provided with resource delta shows that these additions and removals are related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param destination the destination path
- * @param updateFlags bit-wise or of update flag constants ( This is a convenience method, fully equivalent to:
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource has been removed from its parent
- * and that a corresponding resource has been added to its new parent. Additional information
- * provided with resource delta shows that these additions and removals are related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the destination project description
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param keepHistory a flag indicating whether or not to keep local history for files
- * @param monitor a progress monitor, or When a resource moves, its session and persistent properties move with it. Likewise for all
- * the other attributes of the resource including markers.
- *
- * When this project's location is the default location, then the directories and files on disk
- * are moved to be in the location specified by the given description. If the given description
- * specifies the default location for the project, the directories and files are moved to the
- * default location. If the name in the given description is the same as this project's name and
- * the location is different, then the project contents will be moved to the new location. In all
- * other cases the directories and files on disk are left untouched. Parts of the supplied
- * description other than the name and location are ignored.
- *
- * The The Local history information for this project and its children will not be moved to the
- * destination.
- *
- * The The {@link #REPLACE} update flag controls how this method deals with a change of location.
- * If the location changes and the {@link #REPLACE} flag is not specified, then the projects
- * contents on disk are moved to the new location. If the location changes and the {@link
- * #REPLACE} flag is specified, then the project is reoriented to correspond to the new location,
- * but no contents are moved on disk. The contents already on disk at the new location become the
- * project contents. If the new project location does not exist, it will be created.
- *
- * Update flags other than those listed above are ignored.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resource has been removed from its parent
- * and that a corresponding resource has been added to its new parent. Additional information
- * provided with resource delta shows that these additions and removals are related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param description the destination project description
- * @param updateFlags bit-wise or of update flag constants ({@link #FORCE}, {@link #KEEP_HISTORY},
- * {@link #SHALLOW} and {@link #REPLACE}).
- * @param monitor a progress monitor, or This method may discover changes to resources; any such changes will be reported in a
- * subsequent resource change event.
- *
- * If a new file or directory is discovered in the local file system at or below the location
- * of this resource, any parent folders required to contain the new resource in the workspace will
- * also be created automatically as required.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param depth valid values are It is the caller's responsibility to ensure that the value of the reverted modification
- * stamp matches this resource's modification stamp prior to the change that has been rolled back.
- * More generally, the caller must ensure that the specification of modification stamps outlined
- * in Reverting the modification stamp will not be reported in a subsequent resource change
- * event.
- *
- * Note that a resource's modification stamp is unrelated to the local time stamp for this
- * resource on disk, if any. A resource's local time stamp is modified using the A derived resource is a regular file or folder that is created in the course of
- * translating, compiling, copying, or otherwise processing other files. Derived resources are not
- * original data, and can be recreated from other resources. It is commonplace to exclude derived
- * resources from version and configuration management because they would otherwise clutter the
- * team repository with version of these ever-changing files as each user regenerates them.
- *
- * If a resource or any of its ancestors is marked as derived, a team provider should assume
- * that the resource is not under version and configuration management by default. That is,
- * the resource should only be stored in a team repository if the user explicitly indicates that
- * this resource is worth saving.
- *
- * Newly-created resources are not marked as derived; rather, the mark must be set explicitly
- * using Projects and the workspace root are never considered derived; attempts to mark them as
- * derived are ignored.
- *
- * This operation does not result in a resource change event, and does not trigger
- * autobuilds.
- *
- * @param isDerived A derived resource is a regular file or folder that is created in the course of
- * translating, compiling, copying, or otherwise processing other files. Derived resources are not
- * original data, and can be recreated from other resources. It is commonplace to exclude derived
- * resources from version and configuration management because they would otherwise clutter the
- * team repository with version of these ever-changing files as each user regenerates them.
- *
- * If a resource or any of its ancestors is marked as derived, a team provider should assume
- * that the resource is not under version and configuration management by default. That is,
- * the resource should only be stored in a team repository if the user explicitly indicates that
- * this resource is worth saving.
- *
- * Newly-created resources are not marked as derived; rather, the mark must be set explicitly
- * using Projects and the workspace root are never considered derived; attempts to mark them as
- * derived are ignored.
- *
- * These changes will be reported in a subsequent resource change event, including an
- * indication that this file's derived flag has changed.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param isDerived Hidden resources are invisible to most clients. Newly-created resources are not hidden
- * resources by default.
- *
- * The workspace root is never considered hidden resource; attempts to mark it as hidden are
- * ignored.
- *
- * This operation does not result in a resource change event, and does not trigger
- * autobuilds.
- *
- * This operation is not related to {@link ResourceAttributes#setHidden(boolean)}. Whether a
- * resource is hidden in the resource tree is unrelated to whether the underlying file is hidden
- * in the file system.
- *
- * @param isHidden When a resource is not local, its content and properties are unavailable for both reading
- * and writing.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param flag whether this resource should be considered local
- * @param depth valid values are Persistent properties are intended to be used by plug-ins to store resource-specific
- * information that should be persisted across platform sessions. The value of a persistent
- * property is a string that must be short - 2KB or less in length. Unlike session properties,
- * persistent properties are stored on disk and maintained across workspace shutdown and restart.
- *
- * The qualifier part of the property name must be the unique identifier of the declaring
- * plug-in (e.g. Sample usage: Note that a resource cannot be converted into a symbolic link by setting resource attributes
- * with {@link ResourceAttributes#isSymbolicLink()} set to true.
- *
- * @param attributes the attributes to set
- * @exception CoreException if this method fails. Reasons include:
- * Sessions properties are intended to be used as a caching mechanism by ISV plug-ins. They
- * allow key-object associations to be stored with existing resources in the workspace. These
- * key-value associations are maintained in memory (at all times), and the information is lost
- * when a resource is deleted from the workspace, when the parent project is closed, or when the
- * workspace is closed.
- *
- * The qualifier part of the property name must be the unique identifier of the declaring
- * plug-in (e.g. A team private member resource is a special file or folder created by a team provider
- * to hold team-provider-specific information. Resources marked as team private members are
- * invisible to most clients.
- *
- * Newly-created resources are not team private members by default; rather, the team provider
- * must mark a resource explicitly using Projects and the workspace root are never considered team private members; attempts to mark
- * them as team private are ignored.
- *
- * This operation does not result in a resource change event, and does not trigger
- * autobuilds.
- *
- * @param isTeamPrivate This method changes resources; these changes will be reported in a subsequent resource
- * change event. If the resource is a project, the change event will indicate a description
- * change.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param monitor a progress monitor, or Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Resource change events describe changes to resources.
- *
- * There are currently five different types of resource change events:
- *
- * In order to handle additional event types that may be introduced in future releases of the
- * platform, clients should do not write code that presumes the set of event types is closed.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResourceChangeEvent {
- /**
- * Event type constant (bit mask) indicating an after-the-fact report of creations, deletions, and
- * modifications to one or more resources expressed as a hierarchical resource delta as returned
- * by Calling this method is equivalent to walking the entire resource delta for this event, and
- * collecting all marker deltas of a given type. The speed of this method will be proportional to
- * the number of changed markers, regardless of the size of the resource delta tree.
- *
- * @param type the type of marker to consider, or If the event is a If the event is of type If the event is a Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.EventListener;
-
-/**
- * A resource change listener is notified of changes to resources in the workspace. These changes
- * arise from direct manipulation of resources, or indirectly through re-synchronization with the
- * local file system.
- *
- * Clients may implement this interface.
- *
- * @see IResourceDelta
- * @see IWorkspace#addResourceChangeListener(IResourceChangeListener, int)
- */
-public interface IResourceChangeListener extends EventListener {
- /**
- * Notifies this listener that some resource changes are happening, or have already happened.
- *
- * The supplied event gives details. This event object (and the resource delta within it) is
- * valid only for the duration of the invocation of this method.
- *
- * Note: This method is called by the platform; it is not intended to be called directly by
- * clients.
- *
- * Note that during resource change event notification, further changes to resources may be
- * disallowed.
- *
- * @param event the resource change event
- * @see IResourceDelta
- */
- public void resourceChanged(IResourceChangeEvent event);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceDelta.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceDelta.java
deleted file mode 100644
index 8e7919a0456..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceDelta.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.internal.watson.IElementComparator;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.*;
-
-/**
- * A resource delta represents changes in the state of a resource tree between two discrete points
- * in time.
- *
- * Resource deltas implement the This is a convenience method, fully equivalent to This is a convenience method, fully equivalent to:
- *
- * The member flags determine which child deltas of this resource delta will be visited. The
- * visitor will always be invoked for this resource delta.
- *
- * If the If the This is a convenience method to avoid manual traversal of the delta tree in cases where the
- * listener is only interested in changes to particular resources. Calling this method will
- * generally be faster than manually traversing the delta to a particular descendent.
- *
- * @param path the path of the desired descendent delta
- * @return the descendent delta, or This is a convenience method, fully equivalent to:
- *
- * This is a convenience method, fully equivalent to:
- *
- * If the If the {@link IContainer#INCLUDE_HIDDEN} member flag is not specified, (recommended),
- * resource deltas involving hidden resources will be excluded. If the {@link
- * IContainer#INCLUDE_HIDDEN} member flag is specified, the result will also include resource
- * deltas of the specified kinds to hidden resources.
- *
- * Specifying the The following codes (bit masks) are used when kind is Note that the move flags only describe the changes to a single resource; they don't
- * necessarily imply anything about the parent or children of the resource. If the children were
- * moved as a consequence of a subtree move operation, they will have corresponding move flags as
- * well.
- *
- * Note that it is possible for a file resource to be replaced in the workspace by a folder
- * resource (or the other way around). The resource delta, which is actually expressed in terms of
- * paths instead or resources, shows this as a change to either the content or children.
- *
- * @return the flags
- * @see IResourceDelta#CONTENT
- * @see IResourceDelta#DERIVED_CHANGED
- * @see IResourceDelta#DESCRIPTION
- * @see IResourceDelta#ENCODING
- * @see IResourceDelta#LOCAL_CHANGED
- * @see IResourceDelta#OPEN
- * @see IResourceDelta#MOVED_TO
- * @see IResourceDelta#MOVED_FROM
- * @see IResourceDelta#COPIED_FROM
- * @see IResourceDelta#TYPE
- * @see IResourceDelta#SYNC
- * @see IResourceDelta#MARKERS
- * @see IResourceDelta#REPLACED
- * @see #getKind()
- * @see #getMovedFromPath()
- * @see #getMovedToPath()
- * @see IResource#move(IPath, int, IProgressMonitor)
- */
- public int getFlags();
-
- /**
- * Returns the full, absolute path of this resource delta.
- *
- * Note: the returned path never has a trailing separator.
- *
- * @return the full, absolute path of this resource delta
- * @see IResource#getFullPath()
- * @see #getProjectRelativePath()
- */
- public IPath getFullPath();
-
- /**
- * Returns the kind of this resource delta. Normally, one of Note: the returned path never has a trailing separator.
- *
- * @return a path, or Note: the returned path never has a trailing separator.
- *
- * @return a path, or A resource's project-relative path indicates the route from the project to the resource.
- * Within a workspace, there is exactly one such path for any given resource. The returned path
- * never has a trailing separator.
- *
- * @return the project-relative path of this resource delta
- * @see IResource#getProjectRelativePath()
- * @see #getFullPath()
- * @see Path#EMPTY
- */
- public IPath getProjectRelativePath();
-
- /**
- * Returns a handle for the affected resource.
- *
- * For additions ( For changes ( For removals ( For phantom additions and removals ( Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * An objects that visits resource deltas.
- *
- * Usage:
- *
- * Clients may implement this interface.
- *
- * @see IResource#accept(IResourceVisitor)
- */
-public interface IResourceDeltaVisitor {
- /**
- * Visits the given resource delta.
- *
- * @return Contributors: Serge Beauchamp (Freescale Semiconductor) - initial API and implementation IBM -
- * ongoing development *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * A description of a resource filter.
- *
- * A filter determines which file system objects will be visible when a local refresh is
- * performed for an IContainer.
- *
- * @see IContainer#getFilters()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 3.6
- */
-public interface IResourceFilterDescription {
-
- /*====================================================================
- * Constants defining which members are wanted:
- *====================================================================*/
-
- /**
- * Flag for resource filters indicating that the filter list includes only the files matching the
- * filters. All INCLUDE_ONLY filters are applied to the resource list with an logical OR
- * operation.
- */
- public static final int INCLUDE_ONLY = 1;
-
- /**
- * Flag for resource filters indicating that the filter list excludes all the files matching the
- * filters. All EXCLUDE_ALL filters are applied to the resource list with an logical AND
- * operation.
- */
- public static final int EXCLUDE_ALL = 2;
-
- /** Flag for resource filters indicating that this filter applies to files. */
- public static final int FILES = 4;
-
- /** Flag for resource filters indicating that this filter applies to folders. */
- public static final int FOLDERS = 8;
-
- /**
- * Flag for resource filters indicating that the container children of the path inherit from this
- * filter as well.
- */
- public static final int INHERITABLE = 16;
-
- /**
- * Returns the description of the file info matcher corresponding to this resource filter.
- *
- * @return the file info matcher description for this resource filter
- */
- public FileInfoMatcherDescription getFileInfoMatcherDescription();
-
- /**
- * Return the resource towards which this filter is set.
- *
- * @return the resource towards which this filter is set
- */
- public IResource getResource();
-
- /**
- * Return the filter type, either INCLUDE_ONLY or EXCLUDE_ALL
- *
- * @return (INCLUDE_ONLY or EXCLUDE_ALL) and/or INHERITABLE
- */
- public int getType();
-
- /**
- * Deletes this filter description from its associated resource.
- *
- * The {@link IResource#BACKGROUND_REFRESH} update flag controls when changes to the resource
- * hierarchy under this container resulting from the filter removal take effect. If this flag is
- * specified, the resource hierarchy is updated in a separate thread after this method returns. If
- * the flag is not specified, any resource changes resulting from the filter removal will occur
- * before this method returns.
- *
- * This operation changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication of any resources that have been added as a result
- * of the filter removal.
- *
- * This operation is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#BACKGROUND_REFRESH})
- * @param monitor a progress monitor, or Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.QualifiedName;
-
-/**
- * A lightweight interface for requesting information about a resource. All of the "get" methods on
- * a resource proxy have trivial performance cost. Requesting the full path or the actual resource
- * handle will cause extra objects to be created and will thus have greater cost.
- *
- * When a resource proxy is used within an {@link IResourceProxyVisitor}, it is a transient
- * object that is only valid for the duration of a single visit method. A proxy should not be
- * referenced once the single resource visit is complete. The equals and hashCode methods should not
- * be relied on.
- *
- * A proxy can also be created using {@link IResource#createProxy()}. In this case the proxy is
- * valid indefinitely, but will not remain in sync with the state of the corresponding resource.
- *
- * @see IResourceProxyVisitor
- * @since 2.1
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResourceProxy {
- /**
- * Returns the modification stamp of the resource being visited.
- *
- * @return the modification stamp, or Note that this method can return an out of date property value, or a value that no longer
- * exists, if session properties are being modified concurrently with the resource visit.
- *
- * @param key the qualified name of the property
- * @return the string value of the session property, or Note that this is not a "free" proxy operation. This method will generally cause a
- * path object to be created. For an optimal visitor, only call this method when absolutely
- * necessary. Note that the simple resource name can be obtained from the proxy with no cost.
- *
- * @return the full path of the resource
- * @see IResource#getFullPath()
- */
- public IPath requestFullPath();
-
- /**
- * Returns the handle of the resource being visited.
- *
- * Note that this is not a "free" proxy operation. This method will generally cause
- * both a path object and a resource object to be created. For an optimal visitor, only call this
- * method when absolutely necessary. Note that the simple resource name can be obtained from the
- * proxy with no cost, and the full path of the resource can be obtained through the proxy with
- * smaller cost.
- *
- * @return the resource handle
- */
- public IResource requestResource();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceProxyVisitor.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceProxyVisitor.java
deleted file mode 100644
index 5fc1b0a689d..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceProxyVisitor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * This interface is implemented by objects that visit resource trees. The fast visitor is an
- * optimized mechanism for tree traversal that creates a minimal number of objects. The visitor is
- * provided with a callback interface, instead of a resource. Through the callback, the visitor can
- * request information about the resource being visited.
- *
- * Usage:
- *
- * Clients may implement this interface.
- *
- * @see IResource#accept(IResourceVisitor)
- * @since 2.1
- */
-public interface IResourceProxyVisitor {
- /**
- * Visits the given resource.
- *
- * @param proxy for requesting information about the resource being visited; this object is only
- * valid for the duration of the invocation of this method, and must not be used after this
- * method has completed
- * @return Contributors: IBM - Initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * A resource rule factory returns scheduling rules for API methods that modify the workspace. These
- * rules can be used when creating jobs or other operations that perform a series of modifications
- * on the workspace. This allows clients to implement two phase commit semantics, where all
- * necessary rules are obtained prior to executing a long running operation.
- *
- * Note that simple use of the workspace APIs does not require use of scheduling rules. All
- * workspace API methods that modify the workspace will automatically obtain any scheduling rules
- * needed to perform the modification. However, if you are aggregating a set of changes to the
- * workspace using If more than one rule is needed, they can be aggregated using the Note that Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * Represents status related to resources in the Resources plug-in and defines the relevant status
- * code constants. Status objects created by the Resources plug-in bear its unique id ( Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * This interface is implemented by objects that visit resource trees.
- *
- * Usage:
- *
- * Clients may implement this interface.
- *
- * @see IResource#accept(IResourceVisitor)
- */
-public interface IResourceVisitor {
- /**
- * Visits the given resource.
- *
- * @param resource the resource to visit
- * @return Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A context for workspace Note that In the event of an unsuccessful save, this is the value to This is the value to use when, for example, creating files in which a participant will save
- * its data.
- *
- * @return the save number
- * @see ISaveParticipant#saving(ISaveContext)
- */
- public int getSaveNumber();
-
- /**
- * Returns the current location for the given file or For example, assume a plug-in has a configuration file named "config.properties". The map
- * facility can be used to map that logical name onto a real name which is specific to a
- * particular save (e.g., 10.config.properties, where 10 is the current save number). The paths
- * specified here should always be relative to the plug-in state location for the plug-in saving
- * the state.
- *
- * Each save participant must manage the deletion of its old state files. Old state files can
- * be discovered using Note that this is orthogonal to Note that deltas are not guaranteed to be saved even if saving is requested. Deltas cannot
- * be supplied where the previous state is too old or has become invalid.
- *
- * This method is only valid for full saves. It is ignored during snapshots or project saves.
- *
- * @see IWorkspace#addSaveParticipant(org.eclipse.core.runtime.Plugin, ISaveParticipant)
- * @see ISavedState#processResourceChangeEvents(IResourceChangeListener)
- */
- public void needDelta();
-
- /**
- * Indicates that this participant has actively participated in this save. If the save is
- * successful, the current save number will be remembered; this save number will be the previous
- * save number for subsequent saves until the participant again actively participates.
- *
- * If this method is not called, the plug-in is not deemed to be an active participant in this
- * save.
- *
- * Note that this is orthogonal to Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.EventListener;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A participant in the saving of the workspace.
- *
- * Plug-ins implement this interface and register to participate in workspace save operations.
- *
- * Clients may implement this interface.
- *
- * @see IWorkspace#save(boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
-public interface ISaveParticipant extends EventListener {
- /**
- * Tells this participant that the workspace save operation is now complete and it is free to go
- * about its normal business. Exceptions are not expected to be thrown at this point, so they
- * should be handled internally.
- *
- * Note: This method is called by the platform; it is not intended to be called directly by
- * clients.
- *
- * @param context the save context object
- */
- public void doneSaving(ISaveContext context);
-
- /**
- * Tells this participant that the workspace is about to be saved. In preparation, the participant
- * is expected to suspend its normal operation until further notice. Note: This method is called by the platform; it is not intended to be called directly by
- * clients.
- *
- * @param context the save context object
- * @exception CoreException if this method fails to snapshot the state of this workspace
- */
- public void prepareToSave(ISaveContext context) throws CoreException;
-
- /**
- * Tells this participant to rollback its important state. The context's previous state number
- * indicates what it was prior to the failed save. Exceptions are not expected to be thrown at
- * this point, so they should be handled internally.
- *
- * Note: This method is called by the platform; it is not intended to be called directly by
- * clients.
- *
- * @param context the save context object
- * @see ISaveContext#getPreviousSaveNumber()
- */
- public void rollback(ISaveContext context);
-
- /**
- * Tells this participant to save its important state because the workspace is being saved, as
- * described in the supplied save context.
- *
- * Note: This method is called by the platform; it is not intended to be called directly by
- * clients.
- *
- * The basic contract for this method is the same for full saves, snapshots and project saves:
- * the participant must absolutely guarantee that any important user data it has gathered will not
- * be irrecoverably lost in the event of a crash. The only difference is in the space-time
- * tradeoffs that the participant should make.
- *
- * The following snippet shows how a plug-in participant would write its important state to a
- * file whose name is based on the save number for this save operation.
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A data structure returned by {@link
- * IWorkspace#addSaveParticipant(org.eclipse.core.runtime.Plugin, ISaveParticipant)} containing a
- * save number and an optional resource delta.
- *
- * @see IWorkspace#addSaveParticipant(org.eclipse.core.runtime.Plugin, ISaveParticipant)
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISavedState {
- /**
- * Returns the files mapped with the {@link ISaveContext#map(IPath, IPath)} facility. Returns an
- * empty array if there are no mapped files.
- *
- * @return the files currently mapped by the participant
- * @see #lookup(IPath)
- * @see ISaveContext#map(IPath, IPath)
- */
- public IPath[] getFiles();
-
- /**
- * Returns the save number for the save participant. This is the save number of the last
- * successful save in which the plug-in actively participated, or No notification is received in the following cases:
- *
- * All clients should have a contingency plan in place in case a changes are not available (the
- * case should be very similar to the first time a plug-in is activated, and only has the current
- * state of the workspace to work from).
- *
- * The supplied event is of type {@link IResourceChangeEvent#POST_BUILD} and contains the delta
- * detailing changes since this plug-in last participated in a save. This event object (and the
- * resource delta within it) is valid only for the duration of the invocation of this method.
- *
- * @param listener the listener
- * @see ISaveContext#needDelta()
- * @see IResourceChangeListener
- */
- public void processResourceChangeEvents(IResourceChangeListener listener);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IStorage.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IStorage.java
deleted file mode 100644
index e4a6f16a8a9..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IStorage.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.io.InputStream;
-import org.eclipse.core.runtime.*;
-
-/**
- * A storage object represents a set of bytes which can be accessed. These may be in the form of an
- * Storage objects implement the Clients may implement this interface.
- */
-public interface IStorage extends IAdaptable {
- /**
- * Returns an open input stream on the contents of this storage. The caller is responsible for
- * closing the stream when finished.
- *
- * @return an input stream containing the contents of this storage
- * @exception CoreException if the contents of this storage could not be accessed. See any
- * refinements for more information.
- */
- public InputStream getContents() throws CoreException;
-
- /**
- * Returns the full path of this storage. The returned value depends on the implementor/extender.
- * A storage need not have a path.
- *
- * @return the path related to the data represented by this storage or Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.QualifiedName;
-
-/**
- * A synchronizer which maintains a list of registered partners and, on behalf of each partner, it
- * keeps resource level synchronization information (a byte array). Sync info is saved only when the
- * workspace is saved.
- *
- * @see IWorkspace#getSynchronizer()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISynchronizer {
- /**
- * Visits the given resource and its descendents with the specified visitor if sync information
- * for the given sync partner is found on the resource. If sync information for the given sync
- * partner is not found on the resource, still visit the children of the resource if the depth
- * specifies to do so.
- *
- * @param partner the sync partner name
- * @param start the parent resource to start the visitation
- * @param visitor the visitor to use when visiting the resources
- * @param depth the depth to which members of this resource should be visited. One of Sync information is not stored on the workspace root. Attempts to set information on the
- * root will be ignored.
- *
- * @param partner the sync partner name
- * @param resource the resource
- * @param info the synchronization information, or Contributors: IBM Corporation - initial API and implementation Red Hat Incorporated -
- * loadProjectDescription(InputStream) Broadcom Corporation - build configurations and references
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.resources.team.FileModificationValidationContext;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
-/**
- * Workspaces are the basis for Eclipse Platform resource management. There is only one workspace
- * per running platform. All resources exist in the context of this workspace.
- *
- * A workspace corresponds closely to discreet areas in the local file system. Each project in a
- * workspace maps onto a specific area of the file system. The folders and files within a project
- * map directly onto the corresponding directories and files in the file system. One sub-directory,
- * the workspace metadata area, contains internal information about the workspace and its resources.
- * This metadata area should be accessed only by the Platform or via Platform API calls.
- *
- * Workspaces add value over using the file system directly in that they allow for comprehensive
- * change tracking (through The workspace as a whole is thread safe and allows one writer concurrent with multiple
- * readers. It also supports mechanisms for saving and snapshotting the current resource state.
- *
- * The workspace is provided by the Resources plug-in and is automatically created when that
- * plug-in is activated. The default workspace data area (i.e., where its resources are stored)
- * overlap exactly with the platform's data area. That is, by default, the workspace's projects are
- * found directly in the platform's data area. Individual project locations can be specified
- * explicitly.
- *
- * The workspace resource namespace is always case-sensitive and case-preserving. Thus the
- * workspace allows multiple sibling resources to exist with names that differ only in case. The
- * workspace also imposes no restrictions on valid characters in resource names, the length of
- * resource names, or the size of resources on disk. In situations where one or more resources are
- * stored in a file system that is not case-sensitive, or that imposes restrictions on resource
- * names, any failure to store or retrieve those resources will be propagated back to the caller of
- * workspace API.
- *
- * Workspaces implement the This method is equivalent to:
- *
- * Once registered, a listener starts receiving notification of changes to resources in the
- * workspace. The resource deltas in the resource change event are rooted at the workspace root.
- * Most resource change notifications occur well after the fact; the exception is pre-notification
- * of impending project closures and deletions. The listener continues to receive notifications
- * until it is replaced or removed.
- *
- * Listeners can listen for several types of event as defined in Once registered, the workspace save participant will actively participate in the saving of
- * this workspace.
- *
- * @param plugin the plug-in
- * @param participant the participant
- * @return the last saved state in which the plug-in participated, or Once registered, the workspace save participant will actively participate in the saving of
- * this workspace.
- *
- * @param pluginId the unique identifier of the plug-in
- * @param participant the participant
- * @return the last saved state in which the plug-in participated, or This method may change resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param kind the kind of build being requested. Valid values are
- * Build order is determined by the workspace description and the project build configuration
- * reference graph.
- *
- * If buildReferences is true, build configurations reachable through the build configuration
- * graph are built as part of this build invocation.
- *
- * This method may change resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param buildConfigs array of configurations to build
- * @param kind the kind of build being requested. Valid values are
- * When invoked in the dynamic scope of a call to the This method has no effect if invoked outside the dynamic scope of a call to the This method should be used under controlled circumstance (e.g., to break up extremely
- * long-running operations).
- *
- * @param build whether or not to run a build
- * @see IWorkspace#run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor)
- */
- public void checkpoint(boolean build);
-
- /**
- * Returns the prerequisite ordering of the given projects. The computation is done by
- * interpreting the projects' active build configuration references as dependency relationships.
- * For example if A references B and C, and C references B, this method, given the list A, B, C
- * will return the order B, C, A. That is, projects with no dependencies are listed first.
- *
- * The return value is a two element array of project arrays. The first project array is the
- * list of projects which could be sorted (as outlined above). The second element of the return
- * value is an array of the projects which are ambiguously ordered (e.g., they are part of a
- * cycle).
- *
- * Cycles and ambiguities are handled by elimination. Projects involved in cycles are simply
- * cut out of the ordered list and returned in an undefined order. Closed and non-existent
- * projects are ignored and do not appear in the returned value at all.
- *
- * @param projects the projects to order
- * @return the projects in sorted order and a list of projects which could not be ordered
- * @deprecated Replaced by This class is not intended to be instantiated by clients.
- *
- * @see IWorkspace#computeProjectOrder(IProject[])
- * @since 2.1
- */
- public final class ProjectOrder {
- /**
- * Creates an instance with the given values.
- *
- * This class is not intended to be instantiated by clients.
- *
- * @param projects initial value of When there are choices, the choice is made in a reasonably stable way. For example, given an
- * arbitrary choice between two projects, the one with the lower collating project name is usually
- * selected.
- *
- * When the project reference graph contains cyclic references, it is impossible to honor all
- * of the relationships. In this case, the result ignores as few relationships as possible. For
- * example, if P2 references P1, P4 references P3, and P2 and P3 reference each other, then
- * exactly one of the relationships between P2 and P3 will have to be ignored. The outcome will be
- * either [P1, P2, P3, P4] or [P1, P3, P2, P4]. The result also contains complete details of any
- * cycles present.
- *
- * This method is time-consuming and should not be called unnecessarily. There are a very
- * limited set of changes to a workspace that could affect the outcome: creating, renaming, or
- * deleting a project; opening or closing a project; adding or removing a project reference.
- *
- * @param projects the projects to order
- * @return result describing the project order
- * @since 2.1
- */
- public ProjectOrder computeProjectOrder(IProject[] projects);
-
- /**
- * Copies the given sibling resources so that they are located as members of the resource at the
- * given path; the names of the copies are the same as the corresponding originals.
- *
- * This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resources have been added to the new
- * parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param resources the resources to copy
- * @param destination the destination container path
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or This method can be expressed as a series of calls to After successful completion, corresponding new resources will now exist as members of the
- * resource at the given path.
- *
- * The supplied path may be absolute or relative. Absolute paths fully specify the new location
- * for the resource, including its project. Relative paths are considered to be relative to the
- * container of the resources being copied. A trailing separator is ignored.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resources have been added to the new
- * parent.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param resources the resources to copy
- * @param destination the destination container path
- * @param updateFlags bit-wise or of update flag constants
- * @param monitor a progress monitor, or This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param resources the resources to delete
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or This method can be expressed as a series of calls to The semantics of multiple deletion are:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param resources the resources to delete
- * @param updateFlags bit-wise or of update flag constants
- * @param monitor a progress monitor, or This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * @param markers the markers to remove
- * @exception CoreException if this method fails. Reasons include:
- * Clients should not call this method unless they have a reason to do so. A plug-in which uses
- * The returned value is writeable.
- *
- * @param projectDescriptionFile the path in the local file system of an existing project
- * description file
- * @return a new project description
- * @exception CoreException if the operation failed. Reasons include:
- * The returned value is writeable.
- *
- * @param projectDescriptionFile an InputStream pointing to an existing project description file
- * @return a new project description
- * @exception CoreException if the operation failed. Reasons include:
- * This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resources have been removed from their
- * parent and that corresponding resources have been added to the new parent. Additional
- * information provided with resource delta shows that these additions and removals are pairwise
- * related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param resources the resources to move
- * @param destination the destination container path
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or This method can be expressed as a series of calls to After successful completion, the resources and descendents will no longer exist; but
- * corresponding new resources will now exist as members of the resource at the given path.
- *
- * The supplied path may be absolute or relative. Absolute paths fully specify the new location
- * for the resource, including its project. Relative paths are considered to be relative to the
- * container of the resources being moved. A trailing separator is ignored.
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event that will include an indication that the resources have been removed from their
- * parent and that corresponding resources have been added to the new parent. Additional
- * information provided with resource delta shows that these additions and removals are pairwise
- * related.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param resources the resources to move
- * @param destination the destination container path
- * @param updateFlags bit-wise or of update flag constants
- * @param monitor a progress monitor, or This API can be used to create {@link IBuildConfiguration}s that will be used as references
- * to {@link IBuildConfiguration}s in other projects. These references are set using {@link
- * IProjectDescription#setBuildConfigReferences(String, IBuildConfiguration[])} and may have a
- * Build configuration do not become part of a project description until set using {@link
- * IProjectDescription#setBuildConfigs(String[])}.
- *
- * @param projectName the name of the project on which the configuration will exist
- * @param configName the name of the new build configuration
- * @return a build configuration
- * @see IProjectDescription#setBuildConfigs(String[])
- * @see IProjectDescription#setBuildConfigReferences(String, IBuildConfiguration[])
- * @see IBuildConfiguration
- * @since 3.7
- */
- public IBuildConfiguration newBuildConfig(String projectName, String configName);
-
- /**
- * Creates and returns a new project description for a project with the given name. This object is
- * useful when creating, moving or copying projects.
- *
- * The project description is initialized to:
- *
- * The returned value is writeable.
- *
- * @param projectName the name of the project
- * @return a new project description
- * @see IProject#getDescription()
- * @see IProject#create(IProjectDescription, IProgressMonitor)
- * @see IResource#copy(IProjectDescription, int, IProgressMonitor)
- * @see IProject#move(IProjectDescription, boolean, IProgressMonitor)
- */
- public IProjectDescription newProjectDescription(String projectName);
-
- /**
- * Removes the given resource change listener from this workspace. Has no effect if an identical
- * listener is not registered.
- *
- * @param listener the listener
- * @see IResourceChangeListener
- * @see #addResourceChangeListener(IResourceChangeListener)
- */
- public void removeResourceChangeListener(IResourceChangeListener listener);
-
- /**
- * Removes the workspace save participant for the given plug-in from this workspace. If no such
- * participant is registered, no action is taken.
- *
- * Once removed, the workspace save participant no longer actively participates in any future
- * saves of this workspace.
- *
- * @param plugin the plug-in
- * @see ISaveParticipant
- * @see #addSaveParticipant(Plugin, ISaveParticipant)
- * @deprecated Use {@link #removeSaveParticipant(String)} instead
- */
- @Deprecated
- public void removeSaveParticipant(Plugin plugin);
-
- /**
- * Removes the workspace save participant for the given plug-in from this workspace. If no such
- * participant is registered, no action is taken.
- *
- * Once removed, the workspace save participant no longer actively participates in any future
- * saves of this workspace.
- *
- * @param pluginId the unique identifier of the plug-in
- * @see ISaveParticipant
- * @see #addSaveParticipant(String, ISaveParticipant)
- * @since 3.6
- */
- public void removeSaveParticipant(String pluginId);
-
- /**
- * Runs the given action as an atomic workspace operation.
- *
- * After running a method that modifies resources in the workspace, registered listeners
- * receive after-the-fact notification of what just transpired, in the form of a resource change
- * event. This method allows clients to call a number of methods that modify resources and only
- * have resource change event notifications reported at the end of the entire batch.
- *
- * If this method is called outside the dynamic scope of another such call, this method runs
- * the action and then reports a single resource change event describing the net effect of all
- * changes done to resources by the action.
- *
- * If this method is called in the dynamic scope of another such call, this method simply runs
- * the action.
- *
- * The supplied scheduling rule is used to determine whether this operation can be run
- * simultaneously with workspace changes in other threads. If the scheduling rule conflicts with
- * another workspace change that is currently running, the calling thread will be blocked until
- * that change completes. If the action attempts to make changes to the workspace that were not
- * specified in the scheduling rule, it will fail. If no scheduling rule is supplied, there are no
- * scheduling restrictions for this operation. If a non- The AVOID_UPDATE flag controls whether periodic resource change notifications should occur
- * during the scope of this call. If this flag is specified, and no other threads modify the
- * workspace concurrently, then all resource change notifications will be deferred until the end
- * of this call. If this flag is not specified, the platform may decide to broadcast periodic
- * resource change notifications during the scope of this call.
- *
- * Flags other than This is a convenience method, fully equivalent to:
- *
- * The To ensure that all outstanding changes to the workspace have been reported to interested
- * parties prior to saving, a full save cannot be used within the dynamic scope of an The workspace is comprised of several different kinds of data with varying degrees of
- * importance. The most important data, the resources themselves and their persistent properties,
- * are written to disk immediately; other data are kept in volatile memory and only written to
- * disk periodically; and other data are maintained in memory and never written out. The following
- * table summarizes what gets saved when:
- *
- * If the platform is shutdown (or crashes) after saving the workspace, any information written
- * to disk by the last successful workspace The workspace provides a general mechanism for keeping concerned parties apprised of any and
- * all changes to resources in the workspace ( At certain points during this method, the entire workspace resource tree must be locked to
- * prevent resources from being changed (read access to resources is permitted).
- *
- * Implementation note: The execution sequence is as follows.
- *
- * After a full save, the platform can be shutdown. This will cause the Resources plug-in and
- * all the other plug-ins to shutdown, without disturbing the saved workspace on disk.
- *
- * When the platform is later restarted, activating the Resources plug-in opens the saved
- * workspace. This reads into memory the workspace's resource tree, plug-in save table, and saved
- * resource tree snapshots (everything that was written to disk in the atomic operation above).
- * Later, when a plug-in gets reactivated and registers to participate in workspace saves, it is
- * handed back the info from its entry in the plug-in save table, if it has one. It gets back the
- * number of the last save in which it actively participated and, possibly, a resource delta.
- *
- * The only source of long term garbage would come from a plug-in that never gets reactivated,
- * or one that gets reactivated but fails to register for workspace saves. (There is no such
- * problem with a plug-in that gets uninstalled; its easy enough to scrub its state areas and
- * delete its entry in the plug-in save table.)
- *
- * @param full Natures that are missing from the install or are involved in a prerequisite cycle are sorted
- * arbitrarily. Duplicate nature IDs are removed, so the returned array may be smaller than the
- * original.
- *
- * @param natureIds a valid set of nature extension identifiers
- * @return the set of nature Ids sorted in prerequisite order
- * @see #validateNatureSet(String[])
- * @since 2.0
- */
- public String[] sortNatureSet(String[] natureIds);
-
- /**
- * Advises that the caller intends to modify the contents of the given files in the near future
- * and asks whether modifying all these files would be reasonable. The files must all exist. This
- * method is used to give the VCM component an opportunity to check out (or otherwise prepare) the
- * files if required. (It is provided in this component rather than in the UI so that "core"
- * (i.e., head-less) clients can use it. Similarly, it is located outside the VCM component for
- * the convenience of clients that must also operate in configurations without VCM.)
- *
- * A client (such as an editor) should perform a By passing a UI context, the caller indicates that the VCM component may contact the user to
- * help decide how best to proceed. If no UI context is provided, the VCM component will make its
- * decision without additional interaction with the user. If OK is returned, the caller can safely
- * assume that all of the given files haven been prepared for modification and that there is good
- * reason to believe that If a shell is passed in as the context, the VCM component may bring up a dialogs to query
- * the user or report difficulties; the shell should be used to parent any such dialogs; the
- * caller may safely assume that the reasons for failure will have been made clear to the user. If
- * {@link IWorkspace#VALIDATE_PROMPT} is passed as the context, this indicates that the caller
- * does not have access to a UI context but would still like the user to be prompted if required.
- * If The method calls This method may be called from any thread. If the UI context is used, it is the
- * responsibility of the implementor of Note that if the resource or its parent doesn't exist yet in the workspace, it is possible
- * that it will still be effectively filtered out once the resource and/or its parent is created,
- * even though this method doesn't report it.
- *
- * But if this method reports the resource as filtered, even though it, or its parent, doesn't
- * exist in the workspace yet, it means that the resource will be filtered out by its parent
- * resource filters once it exists in the workspace.
- *
- * This method will return a status with severity Note: linked resources and virtual folders are never filtered out by their parent resource
- * filters.
- *
- * @param resource the resource to validate the location for
- * @return a status object with code This method also checks that the given resource can legally become a linked resource. This
- * includes the following restrictions:
- *
- * This method will return a status with severity Note: this method does not consider whether files or directories exist in the file system at
- * the specified path.
- *
- * @param resource the resource to validate the location for
- * @param location the location of the linked resource contents on disk
- * @return a status object with code This method also checks that the given resource can legally become a linked resource. This
- * includes the following restrictions:
- *
- * This method will return a status with severity Note: this method does not consider whether files or directories exist in the file system at
- * the specified location.
- *
- * @param resource the resource to validate the location for
- * @param location the location of the linked resource contents in some file system
- * @return a status object with code In addition to the basic restrictions on paths in general (see {@link
- * IPath#isValidSegment(String)}), a resource name must also not contain any characters or
- * substrings that are not valid on the file system on which workspace root is located. In
- * addition, the names "." and ".." are reserved due to their special meaning in file system
- * paths.
- *
- * This validation check is done automatically as a resource is created (but not when the
- * resource handle is constructed); this means that any resource that exists can be safely assumed
- * to have a valid name and path. Note that the name of the workspace root resource is inherently
- * invalid.
- *
- * @param segment the name segment to be checked
- * @param typeMask bitwise-or of the resource type constants ( The following conditions apply to validation of a set of natures:
- *
- * An empty nature set is always valid.
- *
- * @param natureIds an array of nature extension identifiers
- * @return a status object with code In addition to the restrictions for paths in general (see Note: this method does not consider whether a resource at the specified path exists.
- *
- * This validation check is done automatically as a resource is created (but not when the
- * resource handle is constructed); this means that any resource that exists can be safely assumed
- * to have a valid name and path.
- *
- * @param path the path string to be checked
- * @param typeMask bitwise-or of the resource type constants ( Note: this method does not consider whether files or directories exist in the file system at
- * the specified path.
- *
- * @param project the project to validate the location for, can be Note: this method does not consider whether files or directories exist in the file system at
- * the specified path.
- *
- * @param project the project to validate the location for, can be Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-/**
- * A workspace description represents the workspace preferences. It can be used to query the current
- * preferences and set new ones. The workspace preference values are stored in the preference store
- * and are also accessible via the preference mechanism. Constants for the preference keys are found
- * on the When autobuild is on, any changes made to a project and its resources automatically triggers
- * an incremental build of the workspace.
- *
- * Users must call Users must call Users must call Users must call Users must call Users must call Users must call Users must call Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-
-/**
- * A root resource represents the top of the resource hierarchy in a workspace. There is exactly one
- * root in a workspace. The root resource has the following behavior:
- *
- * Workspace roots implement the This is a convenience method, fully equivalent to:
- *
- * This method changes resources; these changes will be reported in a subsequent resource
- * change event.
- *
- * This method is long-running; progress and cancellation are provided by the given progress
- * monitor.
- *
- * @param deleteContent a flag controlling how whether content is aggressively deleted
- * @param force a flag controlling whether resources that are not in sync with the local file
- * system will be tolerated
- * @param monitor a progress monitor, or If the path maps to the platform working location, the returned object will be a single
- * element array consisting of an object of type If the path maps to a project, the resulting array will contain a resource of type The path should be absolute; a relative path will be treated as absolute. The path segments
- * need not be valid names; a trailing separator is ignored. The resulting resources may not
- * currently exist.
- *
- * The result will omit team private members and hidden resources. The result will omit
- * resources within team private members or hidden containers.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * @param location a path in the local file system
- * @return the corresponding containers in the workspace, or an empty array if none
- * @since 2.1
- * @deprecated use {@link #findContainersForLocationURI(URI)} instead
- */
- @Deprecated
- public IContainer[] findContainersForLocation(IPath location);
-
- /**
- * Returns the handles to all the resources (workspace root, project, folder) in the workspace
- * which are mapped to the given URI. Returns an empty array if there are none.
- *
- * If the path maps to the platform working location, the returned object will be a single
- * element array consisting of an object of type If the path maps to a project, the resulting array will contain a resource of type The URI must be absolute; its segments need not be valid names; a trailing separator is
- * ignored. The resulting resources may not currently exist.
- *
- * The result will omit team private members and hidden resources. The result will omit
- * resources within team private member sor hidden containers.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * This is a convenience method, fully equivalent to If the {@link #INCLUDE_TEAM_PRIVATE_MEMBERS} flag is specified in the member flags, team
- * private members will be included along with the others. If the {@link
- * #INCLUDE_TEAM_PRIVATE_MEMBERS} flag is not specified (recommended), the result will omit any
- * team private member resources.
- *
- * If the {@link #INCLUDE_HIDDEN} flag is specified in the member flags, hidden members will be
- * included along with the others. If the {@link #INCLUDE_HIDDEN} flag is not specified
- * (recommended), the result will omit any hidden member resources.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * @param location a URI path into some file system
- * @param memberFlags bit-wise or of member flag constants ( {@link #INCLUDE_TEAM_PRIVATE_MEMBERS}
- * and {@link #INCLUDE_HIDDEN}) indicating which members are of interest
- * @return the corresponding files in the workspace, or an empty array if none
- * @since 3.5
- */
- public IContainer[] findContainersForLocationURI(URI location, int memberFlags);
-
- /**
- * Returns the handles of all files that are mapped to the given path in the local file system.
- * Returns an empty array if there are none. The path should be absolute; a relative path will be
- * treated as absolute. The path segments need not be valid names. The resulting files may not
- * currently exist.
- *
- * The result will omit any team private member and hidden resources. The result will omit
- * resources within team private member or hidden containers.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * @param location a path in the local file system
- * @return the corresponding files in the workspace, or an empty array if none
- * @since 2.1
- * @deprecated use {@link #findFilesForLocationURI(URI)} instead
- */
- @Deprecated
- public IFile[] findFilesForLocation(IPath location);
-
- /**
- * Returns the handles of all files that are mapped to the given URI. Returns an empty array if
- * there are none. The URI must be absolute; its path segments need not be valid names. The
- * resulting files may not currently exist.
- *
- * The result will omit any team private member and hidden resources. The result will omit
- * resources within team private member or hidden containers.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * This is a convenience method, fully equivalent to If the {@link #INCLUDE_TEAM_PRIVATE_MEMBERS} flag is specified in the member flags, team
- * private members will be included along with the others. If the {@link
- * #INCLUDE_TEAM_PRIVATE_MEMBERS} flag is not specified (recommended), the result will omit any
- * team private member resources.
- *
- * If the {@link #INCLUDE_HIDDEN} flag is specified in the member flags, hidden members will be
- * included along with the others. If the {@link #INCLUDE_HIDDEN} flag is not specified
- * (recommended), the result will omit any hidden member resources.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * @param location a URI path into some file system
- * @param memberFlags bit-wise or of member flag constants ( {@link #INCLUDE_TEAM_PRIVATE_MEMBERS}
- * and {@link #INCLUDE_HIDDEN}) indicating which members are of interest
- * @return the corresponding files in the workspace, or an empty array if none
- * @since 3.5
- */
- public IFile[] findFilesForLocationURI(URI location, int memberFlags);
-
- /**
- * Returns a handle to the workspace root, project or folder which is mapped to the given path in
- * the local file system, or This method returns null when the given file system location is not equal to or under the
- * location of any existing project in the workspace, or equal to the location of the platform
- * working location.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * Warning: This method ignores linked resources and their children. Since linked resources may
- * overlap other resources, a unique mapping from a file system location to a single resource is
- * not guaranteed. To find all resources for a given location, including linked resources, use the
- * method This method returns null when the given file system location is not under the location of
- * any existing project in the workspace.
- *
- * The result will also omit resources that are explicitly excluded from the workspace
- * according to existing resource filters.
- *
- * Warning: This method ignores linked resources and their children. Since linked resources may
- * overlap other resources, a unique mapping from a file system location to a single resource is
- * not guaranteed. To find all resources for a given location, including linked resources, use the
- * method Note: This method deals exclusively with resource handles, independent of whether the
- * resources exist in the workspace. With the exception of validating that the name is a valid
- * path segment, validation checking of the project name is not done when the project handle is
- * constructed; rather, it is done automatically as the project is created.
- *
- * @param name the name of the project
- * @return a project resource handle
- * @see #getProjects()
- */
- public IProject getProject(String name);
-
- /**
- * Returns the collection of projects which exist under this root. The projects can be open or
- * closed.
- *
- * This is a convenience method, fully equivalent to If the {@link #INCLUDE_HIDDEN} flag is specified in the member flags, hidden projects will
- * be included along with the others. If the {@link #INCLUDE_HIDDEN} flag is not specified
- * (recommended), the result will omit any hidden projects.
- *
- * @param memberFlags bit-wise or of member flag constants indicating which projects are of
- * interest (only {@link #INCLUDE_HIDDEN} is currently applicable)
- * @return an array of projects
- * @see #getProject(String)
- * @see IResource#isHidden()
- * @since 3.4
- */
- public IProject[] getProjects(int memberFlags);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceRunnable.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceRunnable.java
deleted file mode 100644
index 240c9cf50f0..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceRunnable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A runnable which executes as a batch operation within the workspace. The Clients may implement this interface.
- *
- * @see IWorkspace#run(IWorkspaceRunnable, IProgressMonitor)
- */
-public interface IWorkspaceRunnable {
- /**
- * Runs the operation reporting progress to and accepting cancellation requests from the given
- * progress monitor.
- *
- * Implementors of this method should check the progress monitor for cancellation when it is
- * safe and appropriate to do so. The cancellation request should be propagated to the caller by
- * throwing Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import java.util.concurrent.ConcurrentHashMap;
-import org.eclipse.che.core.internal.preferences.ChePreferences;
-import org.eclipse.core.internal.preferences.EclipsePreferences;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-
-/**
- * Object representing the project scope in the Eclipse preferences hierarchy. Can be used as a
- * context for searching for preference values (in the Project preferences are stored on a per project basis in the project's content area as
- * specified by The path for preferences defined in the project scope hierarchy is as follows: This class is not intended to be subclassed. This class may be instantiated.
- *
- * @see IProject#getLocation()
- * @since 3.0
- */
-public final class ProjectScope implements IScopeContext {
-
- /**
- * String constant (value of Contributors: IBM Corporation - initial API Red Hat Incorporated - initial implementation
- * Martin Oberhuber (Wind River) - [44107] Add symbolic links to ResourceAttributes API
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileSystem;
-
-/**
- * This class represents platform specific attributes of files. Any attributes can be added, but
- * only the attributes that are supported by the platform will be used. These methods do not set the
- * attributes in the file system.
- *
- * @author Red Hat Incorporated
- * @see IResource#getResourceAttributes()
- * @see IResource#setResourceAttributes(ResourceAttributes)
- * @since 3.1
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class ResourceAttributes {
- private int attributes;
-
- // /**
- // * Creates a new resource attributes instance with attributes
- // * taken from the specified file in the file system. If the specified
- // * file does not exist or is not accessible, this method has the
- // * same effect as calling the default constructor.
- // *
- // * @param file The file to get attributes from
- // * @return A resource attributes object
- // */
- // public static ResourceAttributes fromFile(java.io.File file) {
- // try {
- // return FileUtil.fileInfoToAttributes(EFS.getStore(file.toURI()).fetchInfo());
- // } catch (CoreException e) {
- // //file could not be accessed
- // return new ResourceAttributes();
- // }
- // }
-
- /** Creates a new instance of This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_ARCHIVE}.
- *
- * @return This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_EXECUTABLE}.
- *
- * @return This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_HIDDEN}.
- *
- * @return This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_READ_ONLY}.
- *
- * @return This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_SYMLINK}.
- *
- * @return This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_ARCHIVE}.
- *
- * @param archive This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_EXECUTABLE}.
- *
- * @param executable This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_HIDDEN}.
- *
- * @param hidden This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_READ_ONLY}.
- *
- * @param readOnly This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_SYMLINK}.
- *
- * @param symLink Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources;
-
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-import javax.annotation.PostConstruct;
-import org.eclipse.che.api.fs.server.FsManager;
-import org.eclipse.che.api.fs.server.PathTransformer;
-import org.eclipse.che.api.project.server.ProjectManager;
-import org.eclipse.che.api.project.server.impl.RootDirPathProvider;
-import org.eclipse.che.core.internal.resources.Workspace;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.internal.utils.Messages;
-import org.eclipse.core.runtime.IStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/** @author Evgen Vidolob */
-@Singleton
-public class ResourcesPlugin {
-
- /**
- * Unique identifier constant (value This preference suppresses out-of-sync CoreException for some read methods, including:
- * {@link IFile#getContents()} & {@link IFile#getContentDescription()}.
- *
- * In the future the workspace may enable other lightweight auto-refresh mechanisms when this
- * preference is true. (The existing {@link ResourcesPlugin#PREF_AUTO_REFRESH} will continue to
- * enable filesystem hooks and the existing polling based monitor.) See the discussion:
- * https://bugs.eclipse.org/303517
- *
- * @since 3.7
- */
- public static final String PREF_LIGHTWEIGHT_AUTO_REFRESH =
- "refresh.lightweight.enabled"; // $NON-NLS-1$
- /**
- * Name of a preference indicating the encoding to use when reading text files in the workspace.
- * The value is a string, and may be the default empty string, indicating that the file system
- * encoding should be used instead. The file system encoding can be retrieved using Note that there is no guarantee that the value is a supported encoding. Callers should be
- * prepared to handle Note that this method does not check whether the result is a supported encoding. Callers
- * should be prepared to handle Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-
-/** A description of the changes found in a delta */
-public class ChangeDescription {
-
- private List Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * A resource mapping that obtains the traversals for its model object from a set of child mappings.
- *
- * This class is not intended to be subclasses by clients.
- *
- * @since 3.2
- */
-public final class CompositeResourceMapping extends ResourceMapping {
-
- private final ResourceMapping[] mappings;
- private final Object modelObject;
- private IProject[] projects;
- private String providerId;
-
- /**
- * Create a composite mapping that obtains its traversals from a set of sub-mappings.
- *
- * @param modelObject the model object for this mapping
- * @param mappings the sub-mappings from which the traversals are obtained
- */
- public CompositeResourceMapping(
- String providerId, Object modelObject, ResourceMapping[] mappings) {
- this.modelObject = modelObject;
- this.mappings = mappings;
- this.providerId = providerId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#contains(org.eclipse.core.resources.mapping.ResourceMapping)
- */
- @Override
- public boolean contains(ResourceMapping mapping) {
- for (int i = 0; i < mappings.length; i++) {
- ResourceMapping childMapping = mappings[i];
- if (childMapping.contains(mapping)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the resource mappings contained in this composite.
- *
- * @return Return the resource mappings contained in this composite.
- */
- public ResourceMapping[] getMappings() {
- return mappings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getModelObject()
- */
- @Override
- public Object getModelObject() {
- return modelObject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getModelProviderId()
- */
- @Override
- public String getModelProviderId() {
- return providerId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ResourceMapping#getProjects()
- */
- @Override
- public IProject[] getProjects() {
- if (projects == null) {
- Set Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A model provider descriptor contains information about a model provider obtained from the plug-in
- * manifest ( Model provider descriptors are platform-defined objects that exist independent of whether that
- * model provider's plug-in has been started. In contrast, a model provider's runtime object ( The model provider identifier is composed of the model provider's plug-in id and the simple
- * id of the provider extension. For example, if plug-in Note that any translation specified in the plug-in manifest file is automatically applied.
- *
- * @return a displayable string label for this model provider, possibly the empty string
- */
- public String getLabel();
-
- /**
- * From the provides set of resources, return those that match the enablement rule specified for
- * the model provider descriptor. The resource mappings for the returned resources can then be
- * obtained by invoking {@link
- * org.eclipse.core.resources.mapping.ModelProvider#getMappings(IResource[],
- * ResourceMappingContext, IProgressMonitor)}
- *
- * @param resources the resources
- * @return the resources that match the descriptor's enablement rule
- */
- public IResource[] getMatchingResources(IResource[] resources) throws CoreException;
-
- /**
- * Return the set of traversals that overlap with the resources that this descriptor matches.
- *
- * @param traversals the traversals being tested
- * @return the subset of these traversals that overlap with the resources that match this
- * descriptor
- * @throws CoreException
- */
- public ResourceTraversal[] getMatchingTraversals(ResourceTraversal[] traversals)
- throws CoreException;
-
- /**
- * Return the model provider for this descriptor, instantiating it if it is the first time the
- * method is called.
- *
- * @return the model provider for this descriptor
- * @exception CoreException if the model provider could not be instantiated for some reason
- */
- public ModelProvider getModelProvider() throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/IResourceChangeDescriptionFactory.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/IResourceChangeDescriptionFactory.java
deleted file mode 100644
index dfa1b857a70..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/IResourceChangeDescriptionFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2006,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * This factory is used to build a resource delta that represents a proposed change that can then be
- * passed to the {@link
- * org.eclipse.core.resources.mapping.ResourceChangeValidator#validateChange(IResourceDelta,
- * IProgressMonitor)} method in order to validate the change with any model providers stored in
- * those resources. The deltas created by calls to the methods of this interface will be the same as
- * those generated by the workspace if the proposed operations were performed.
- *
- * This factory does not validate that the proposed operation is valid given the current state of
- * the resources and any other proposed changes. It only records the delta that would result.
- *
- * @see org.eclipse.core.resources.mapping.ResourceChangeValidator
- * @see ModelProvider
- * @since 3.2
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResourceChangeDescriptionFactory {
-
- /**
- * Record a delta that represents a content change for the given file.
- *
- * @param file the file whose contents will be changed
- */
- public void change(IFile file);
-
- /**
- * Record the set of deltas representing the closed of a project.
- *
- * @param project the project that will be closed
- */
- public void close(IProject project);
-
- /**
- * Record the set of deltas representing a copy of the given resource to the given workspace path.
- *
- * @param resource the resource that will be copied
- * @param destination the full workspace path of the destination the resource is being copied to
- */
- public void copy(IResource resource, IPath destination);
-
- /**
- * Record a delta that represents a resource being created.
- *
- * @param resource the resource that is created
- */
- public void create(IResource resource);
-
- /**
- * Record the set of deltas representing a deletion of the given resource.
- *
- * @param resource the resource that will be deleted
- */
- public void delete(IResource resource);
-
- /**
- * Return the proposed delta that has been accumulated by this factory.
- *
- * @return the proposed delta that has been accumulated by this factory
- */
- public IResourceDelta getDelta();
-
- /**
- * Record the set of deltas representing a move of the given resource to the given workspace path.
- * Note that this API is used to describe a resource being moved to another path in the workspace,
- * rather than a move in the file system.
- *
- * @param resource the resource that will be moved
- * @param destination the full workspace path of the destination the resource is being moved to
- */
- public void move(IResource resource, IPath destination);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ModelProvider.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ModelProvider.java
deleted file mode 100644
index 958e6b7da44..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ModelProvider.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.core.internal.resources.mapping.ModelProviderManager;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * Represents the provider of a logical model. The main purpose of this API is to support batch
- * operations on sets of This class may be subclassed by clients.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @since 3.2
- */
-public abstract class ModelProvider extends PlatformObject {
-
- /** The model provider id of the Resources model. */
- public static final String RESOURCE_MODEL_PROVIDER_ID =
- "org.eclipse.core.resources.modelProvider"; // $NON-NLS-1$
-
- private IModelProviderDescriptor descriptor;
-
- /**
- * Return the descriptor for the model provider of the given id or The model provider identifier is composed of the model provider's plug-in id and the simple
- * id of the provider extension. For example, if plug-in Subclasses may override this method.
- *
- * @param resources the resources
- * @param context a resource mapping context
- * @param monitor a progress monitor, or Subclasses may override this method.
- *
- * @param traversals the traversals
- * @param context a resource mapping context
- * @param monitor a progress monitor, or The default implementation accumulates the traversals from the given mappings. Subclasses
- * can override to provide a more optimal transformation.
- *
- * @param mappings the mappings being mapped to resources
- * @param context the context used to determine the set of traversals that cover the mappings
- * @param monitor a progress monitor, or This method must return either a {@link ModelStatus}, or a {@link MultiStatus} whose
- * children are {@link ModelStatus}. The severity of the returned status indicates the severity of
- * the possible side-effects of the operation. Any severity other than This default implementation accepts all changes and returns a status with severity Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Status;
-
-/**
- * A status returned by a model from the resource operation validator. The severity indicates the
- * severity of the possible side effects of the operation. Any severity other than Clients may instantiate or subclass this class.
- *
- * @since 3.2
- */
-public class ModelStatus extends Status {
-
- private final String modelProviderId;
-
- /**
- * Create a model status.
- *
- * @param severity the severity
- * @param pluginId the plugin id
- * @param modelProviderId the model provider id
- * @param message the message
- */
- public ModelStatus(int severity, String pluginId, String modelProviderId, String message) {
- super(severity, pluginId, 0, message, null);
- Assert.isNotNull(modelProviderId);
- this.modelProviderId = modelProviderId;
- }
-
- /**
- * Return the id of the model provider from which this status originated.
- *
- * @return the id of the model provider from which this status originated
- */
- public String getModelProviderId() {
- return modelProviderId;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/RemoteResourceMappingContext.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/RemoteResourceMappingContext.java
deleted file mode 100644
index fd2b71bc8e4..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/RemoteResourceMappingContext.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2012 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * ****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A remote mapping context provides a model element with a view of the remote state of local
- * resources as they relate to a repository operation that is in progress. A repository provider can
- * pass an instance of this interface to a model element when obtaining a set of traversals for a
- * model element. This allows the model element to query the remote state of a resource in order to
- * determine if there are resources that exist remotely but do not exist locally that should be
- * included in the traversal.
- *
- * This class may be subclassed by clients.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see org.eclipse.core.resources.mapping.ResourceMappingContext
- * @since 3.2
- */
-public abstract class RemoteResourceMappingContext extends ResourceMappingContext {
-
- /**
- * Refresh flag constant (bit mask value 1) indicating that the mapping will be making use of the
- * contents of the files covered by the traversals being refreshed.
- */
- public static final int FILE_CONTENTS_REQUIRED = 1;
-
- /**
- * Refresh flag constant (bit mask value 0) indicating that no additional refresh behavior is
- * required.
- */
- public static final int NONE = 0;
-
- /**
- * For three-way comparisons, returns an instance of IStorage in order to allow the caller to
- * access the contents of the base resource that corresponds to the given local resource. The base
- * of a resource is the contents of the resource before any local modifications were made. If the
- * base file does not exist, or if this is a two-way comparison, This method may be long running as a server may need to be contacted to obtain the contents
- * of the file.
- *
- * @param file the local file
- * @param monitor a progress monitor, or This method may be long running as a server may need to be contacted to obtain the members
- * of the base resource.
- *
- * This default implementation always returns This method may be long running as a server may need to be contacted to obtain the members
- * of the container's corresponding remote resource.
- *
- * @param container the local container
- * @param monitor a progress monitor, or This method may be long running as a server may need to be contacted to obtain the contents
- * of the file.
- *
- * @param file the local file
- * @param monitor a progress monitor, or This method may be long running as a server may need to be contacted to obtain the members
- * of the remote resource.
- *
- * This default implementation always returns For three-way comparisons, return whether the contents of the corresponding remote differ
- * from the contents of the base. In other words, this method returns For two-way comparisons, return This can be used by clients to determine if they need to fetch the remote contents in order
- * to determine if the resources that constitute the model element are different in the remote
- * location. If the local file exists and the remote file does not, or the remote file exists and
- * the local does not then the contents will be said to differ (i.e. Note that this is really only a hint to the context provider. It is up to implementors to
- * decide, based on the provided traversals, how to efficiently perform the refresh. In the ideal
- * case, calls to {@link #hasRemoteChange( IResource , IProgressMonitor)} and {@link
- * #fetchMembers} would not need to contact the server after a call to a refresh with appropriate
- * traversals. Also, ideally, if {@link #FILE_CONTENTS_REQUIRED} is on of the flags, then the
- * contents for these files will be cached as efficiently as possible so that calls to {@link
- * #fetchRemoteContents} will also not need to contact the server. This may not be possible for
- * all context providers, so clients cannot assume that the above mentioned methods will not be
- * long running. It is still advisable for clients to call {@link #refresh} with as much details
- * as possible since, in the case where a provider is optimized, performance will be much better.
- *
- * @param traversals the resource traversals that indicate which resources are to be refreshed
- * @param flags additional refresh behavior. For instance, if {@link #FILE_CONTENTS_REQUIRED} is
- * one of the flags, this indicates that the client will be accessing the contents of the
- * files covered by the traversals. {@link #NONE} should be used when no additional behavior
- * is required
- * @param monitor a progress monitor, or Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.che.core.internal.resources.mapping.ResourceChangeDescriptionFactory;
-import org.eclipse.che.core.internal.utils.Policy;
-import org.eclipse.core.internal.utils.Messages;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The resource change validator is used to validate that changes made to resources will not
- * adversely affect the models stored in those resources.
- *
- * The validator is used by first creating a resource delta describing the proposed changes. A
- * delta can be generated using a {@link
- * org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory}. The change is then
- * validated by calling the {@link #validateChange(IResourceDelta, IProgressMonitor)} method. This
- * example validates a change to a single file: This method returns either a {@link org.eclipse.core.resources.mapping.ModelStatus}, or a
- * {@link MultiStatus} whose children are {@link org.eclipse.core.resources.mapping.ModelStatus}.
- * In either case, the severity of the status indicates the severity of the possible side-effects
- * of the operation. Any severity other than Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import java.util.ArrayList;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-
-/**
- * A resource mapping supports the transformation of an application model object into its underlying
- * file system resources. It provides the bridge between a logical element and the physical
- * resource(s) into which it is stored but does not provide more comprehensive model access or
- * manipulations.
- *
- * Mappings provide two means of model traversal. The {@link #accept} method can be used to visit
- * the resources that constitute the model object. Alternatively, a set or traversals can be
- * obtained by calling {@link #getTraversals}. A traversal contains a set of resources and a depth.
- * This allows clients (such a repository providers) to do optimal traversals of the resources
- * w.r.t. the operation that is being performed on the model object.
- *
- * This class may be subclassed by clients.
- *
- * @see IResource
- * @see ResourceTraversal
- * @since 3.2
- */
-public abstract class ResourceMapping extends PlatformObject {
-
- /**
- * Accepts the given visitor for all existing resources in this mapping. The visitor's {@link
- * IResourceVisitor#visit} method is called for each accessible resource in this mapping.
- *
- * @param context the traversal context
- * @param visitor the visitor
- * @param monitor a progress monitor, or This method always returns Subclasses should, when possible, include all resources that are or may be members of the
- * model element. For instance, a model element should return the same list of resources
- * regardless of the existence of the files on the file system. For example, if a logical resource
- * called "form" maps to "/p1/form.xml" and "/p1/form.java" then whether form.xml or form.java
- * existed, they should be returned by this method.
- *
- * In some cases, it may not be possible for a model element to know all the resources that may
- * constitute the element without accessing the state of the model element in another location
- * (e.g. a repository). This method is provided with a context which, when provided, gives access
- * to the members of corresponding remote containers and the contents of corresponding remote
- * files. This gives the model element the opportunity to deduce what additional resources should
- * be included in the traversal.
- *
- * @param context gives access to the state of remote resources that correspond to local resources
- * for the purpose of determining traversals that adequately cover the model element resources
- * given the state of the model element in another location. This parameter may be Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-/**
- * A resource mapping context is provided to a resource mapping when traversing the resources of the
- * mapping. The type of context may determine what resources are included in the traversals of a
- * mapping.
- *
- * There are currently two resource mapping contexts: the local mapping context (represented by
- * the singleton {@link #LOCAL_CONTEXT}), and {@link RemoteResourceMappingContext}. Implementors of
- * {@link org.eclipse.core.resources.mapping.ResourceMapping} should not assume that these are the
- * only valid contexts (in order to allow future extensibility). Therefore, if the provided context
- * is not of one of the above mentioned types, the implementor can assume that the context is a
- * local context.
- *
- * This class may be subclassed by clients; this class is not intended to be instantiated
- * directly.
- *
- * @see org.eclipse.core.resources.mapping.ResourceMapping
- * @see RemoteResourceMappingContext
- * @since 3.2
- */
-public class ResourceMappingContext {
-
- /**
- * This resource mapping context is used to indicate that the operation that is requesting the
- * traversals is performing a local operation. Because the operation is local, the resource
- * mapping is free to be as precise as desired about what resources make up the mapping without
- * concern for performing optimized remote operations.
- */
- public static final ResourceMappingContext LOCAL_CONTEXT = new ResourceMappingContext();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceTraversal.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceTraversal.java
deleted file mode 100644
index 487d2f013da..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceTraversal.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation James Blackburn (Broadcom
- * Corp.) - ongoing development
- * *****************************************************************************
- */
-package org.eclipse.core.resources.mapping;
-
-import java.util.ArrayList;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A resource traversal is simply a set of resources and the depth to which each is to be traversed.
- * A set of traversals is used to describe the resources that constitute a model element.
- *
- * The flags of the traversal indicate which special resources should be included or excluded
- * from the traversal. The flags used are the same as those passed to the {@link
- * IResource#accept(IResourceVisitor, int, int)} method.
- *
- * This class may be instantiated or subclassed by clients.
- *
- * @see org.eclipse.core.resources.IResource
- * @since 3.2
- */
-public class ResourceTraversal {
-
- private final int depth;
- private final int flags;
- private final IResource[] resources;
-
- /**
- * Creates a new resource traversal.
- *
- * @param resources The resources in the traversal
- * @param depth The traversal depth
- * @param flags the flags for this traversal. The traversal flags match those that are passed to
- * the Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.team;
-
-import org.eclipse.core.resources.IWorkspace;
-
-/**
- * A context that is used in conjunction with the {@link FileModificationValidator} to indicate that
- * UI-based validation is desired.
- *
- * This class is not intended to be instantiated or subclassed by clients.
- *
- * @see FileModificationValidator
- * @since 3.3
- */
-public class FileModificationValidationContext {
-
- /**
- * Constant that can be passed to {@link
- * IWorkspace#validateEdit(org.eclipse.core.resources.IFile[], Object)} to indicate that the
- * caller does not have access to a UI context but would still like to have UI-based validation if
- * possible.
- */
- public static final FileModificationValidationContext VALIDATE_PROMPT =
- new FileModificationValidationContext(null);
-
- private final Object shell;
-
- /**
- * Create a context with the given shell.
- *
- * @param shell the shell
- */
- FileModificationValidationContext(Object shell) {
- this.shell = shell;
- }
-
- /**
- * Return the Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.team;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * The file modification validator is a Team-related hook for pre-checking operations that modify
- * the contents of files.
- *
- * This class is used only in conjunction with the
- * "org.eclipse.core.resources.fileModificationValidator" extension point. It is intended to be
- * implemented only by the Eclipse Platform Team plug-in or by repository providers whose validator
- * get invoked by Team.
- *
- * @since 3.3
- */
-public abstract class FileModificationValidator implements IFileModificationValidator {
-
- /**
- * Validates that the given files can be modified. The files must all exist in the workspace. The
- * optional context object may be supplied if UI-based validation is required. If the context is
- * Contributors: IBM - Initial API and implementation James Blackburn (Broadcom Corp.) - ongoing
- * development *****************************************************************************
- */
-package org.eclipse.core.resources.team;
-
-import java.util.HashSet;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourceAttributes;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.MultiRule;
-
-/**
- * Default implementation of IResourceRuleFactory. The teamHook extension may subclass to provide
- * more specialized scheduling rules for workspace operations that they participate in.
- *
- * @see IResourceRuleFactory
- * @since 3.0
- */
-public class ResourceRuleFactory implements IResourceRuleFactory {
- private final IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- /**
- * Creates a new default resource rule factory. This constructor must only be called by
- * subclasses.
- */
- protected ResourceRuleFactory() {
- super();
- }
-
- /**
- * Default implementation of Subclasses may not currently override this method.
- *
- * @see org.eclipse.core.resources.IResourceRuleFactory#buildRule()
- */
- public final ISchedulingRule buildRule() {
- return workspace.getRoot();
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#charsetRule(IResource)
- * @since 3.1
- */
- public ISchedulingRule charsetRule(IResource resource) {
- if (resource.getType() == IResource.ROOT) return null;
- return resource.getProject();
- }
-
- /**
- * Default implementation of Subclasses may not currently override this method.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#derivedRule(IResource)
- * @since 3.6
- */
- public final ISchedulingRule derivedRule(IResource resource) {
- return null;
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#copyRule(IResource, IResource)
- */
- public ISchedulingRule copyRule(IResource source, IResource destination) {
- // source is not modified, destination is created
- return parent(destination);
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#createRule(IResource)
- */
- public ISchedulingRule createRule(IResource resource) {
- return parent(resource);
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#deleteRule(IResource)
- */
- public ISchedulingRule deleteRule(IResource resource) {
- return parent(resource);
- }
-
- private boolean isReadOnly(IResource resource) {
- ResourceAttributes attributes = resource.getResourceAttributes();
- return attributes == null ? false : attributes.isReadOnly();
- }
-
- /**
- * Default implementation of Subclasses may not currently override this method.
- *
- * @see org.eclipse.core.resources.IResourceRuleFactory#markerRule(IResource)
- */
- public final ISchedulingRule markerRule(IResource resource) {
- return null;
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#modifyRule(IResource)
- * @see FileModificationValidator#validateSave(IFile)
- * @see IProjectDescription#DESCRIPTION_FILE_NAME
- */
- public ISchedulingRule modifyRule(IResource resource) {
- IPath path = resource.getFullPath();
- // modifying the project description may cause linked resources to be created or deleted
- if (path.segmentCount() == 2
- && path.segment(1).equals(IProjectDescription.DESCRIPTION_FILE_NAME))
- return parent(resource);
- return resource;
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#moveRule(IResource, IResource)
- */
- public ISchedulingRule moveRule(IResource source, IResource destination) {
- // move needs the parent of both source and destination
- return MultiRule.combine(parent(source), parent(destination));
- }
-
- /**
- * Convenience method to return the parent of the given resource, or the resource itself for
- * projects and the workspace root.
- *
- * @param resource the resource to compute the parent of
- * @return the parent resource for folders and files, and the resource itself for projects and the
- * workspace root.
- */
- protected final ISchedulingRule parent(IResource resource) {
- switch (resource.getType()) {
- case IResource.ROOT:
- case IResource.PROJECT:
- return resource;
- default:
- return resource.getParent();
- }
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#refreshRule(IResource)
- */
- public ISchedulingRule refreshRule(IResource resource) {
- return parent(resource);
- }
-
- /**
- * Default implementation of Subclasses may override this method. The rule provided by an overriding method must at least
- * contain the rule from this default implementation.
- *
- * @see
- * org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
- * @see org.eclipse.core.resources.IResourceRuleFactory#validateEditRule(IResource[])
- */
- public ISchedulingRule validateEditRule(IResource[] resources) {
- if (resources.length == 0) return null;
- // optimize rule for single file
- if (resources.length == 1) return isReadOnly(resources[0]) ? parent(resources[0]) : null;
- // need a lock on the parents of all read-only files
- HashSet Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.core.resources.team;
-
-import java.net.URI;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.internal.resources.InternalTeamHook;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-/**
- * A general hook class for operations that team providers may be interested in participating in.
- * Implementors of the hook should provide a concrete subclass, and override any methods they are
- * interested in.
- *
- * This class is intended to be subclassed by the team component in conjunction with the This method must not return This default implementation always returns the value of the The supplied factory must not be Note that the new rule factory will only take effect for resource changing operations that
- * begin after this method completes. Care should be taken to avoid calling this method during the
- * invocation of any resource changing operation (in any thread). The best time to change rule
- * factories is during resource change notification when the workspace is locked for modification.
- *
- * @param project the project to change the resource rule factory for
- * @param factory the new resource rule factory
- * @see #getRuleFactory(IProject)
- * @see IResourceRuleFactory
- * @since 3.0
- */
- @Override
- protected final void setRuleFactory(IProject project, IResourceRuleFactory factory) {
- super.setRuleFactory(project, factory);
- }
-
- /**
- * Validates whether a particular attempt at link creation is allowed. This gives team providers
- * an opportunity to hook into the beginning of the implementation of The implementation of this method runs "below" the resources API and is therefore very
- * restricted in what resource API method it can call. The list of useable methods includes most
- * resource operations that read but do not update the resource tree; resource operations that
- * modify resources and trigger deltas must not be called from within the dynamic scope of the
- * invocation of this method.
- *
- * This method should be overridden by subclasses that want to control what links are created.
- * The default implementation of this method allows all links to be created.
- *
- * @param file the file to be linked
- * @param updateFlags bit-wise or of update flag constants (only ALLOW_MISSING_LOCAL is relevant
- * here)
- * @param location a file system path where the file should be linked
- * @return a status object with code The implementation of this method runs "below" the resources API and is therefore very
- * restricted in what resource API method it can call. The list of useable methods includes most
- * resource operations that read but do not update the resource tree; resource operations that
- * modify resources and trigger deltas must not be called from within the dynamic scope of the
- * invocation of this method.
- *
- * This method should be overridden by subclasses that want to control what links are created.
- * The default implementation of this method allows all links to be created.
- *
- * @param file the file to be linked
- * @param updateFlags bit-wise or of update flag constants (only ALLOW_MISSING_LOCAL is relevant
- * here)
- * @param location a file system URI where the file should be linked
- * @return a status object with code The implementation of this method runs "below" the resources API and is therefore very
- * restricted in what resource API method it can call. The list of useable methods includes most
- * resource operations that read but do not update the resource tree; resource operations that
- * modify resources and trigger deltas must not be called from within the dynamic scope of the
- * invocation of this method.
- *
- * This method should be overridden by subclasses that want to control what links are created.
- * The default implementation of this method allows all links to be created.
- *
- * @param folder the file to be linked
- * @param updateFlags bit-wise or of update flag constants (only ALLOW_MISSING_LOCAL is relevant
- * here)
- * @param location a file system path where the folder should be linked
- * @return a status object with code The implementation of this method runs "below" the resources API and is therefore very
- * restricted in what resource API method it can call. The list of useable methods includes most
- * resource operations that read but do not update the resource tree; resource operations that
- * modify resources and trigger deltas must not be called from within the dynamic scope of the
- * invocation of this method.
- *
- * This method should be overridden by subclasses that want to control what links are created.
- * The default implementation of this method allows all links to be created.
- *
- * @param folder the file to be linked
- * @param updateFlags bit-wise or of update flag constants (only ALLOW_MISSING_LOCAL is relevant
- * here)
- * @param location a file system path where the folder should be linked
- * @return a status object with code Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che;
-
-/** Provide URL for Javadoc service */
-public interface JavadocUrlProvider {
-
- String getJavadocUrl(String projectPath);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/JavadocFinder.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/JavadocFinder.java
deleted file mode 100644
index 385145e033c..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/JavadocFinder.java
+++ /dev/null
@@ -1,547 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt;
-
-import com.google.inject.Singleton;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.net.URISyntaxException;
-import java.net.URL;
-import org.eclipse.che.commons.lang.IoUtil;
-import org.eclipse.che.jdt.dom.ASTNodes;
-import org.eclipse.che.jdt.javadoc.HTMLPrinter;
-import org.eclipse.che.jdt.javadoc.JavaDocLocations;
-import org.eclipse.che.jdt.javadoc.JavaElementLabels;
-import org.eclipse.che.jdt.javadoc.JavaElementLinks;
-import org.eclipse.che.jdt.javadoc.JavadocContentAccess2;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IAnnotatable;
-import org.eclipse.jdt.core.ICodeAssist;
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IRegion;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ClassInstanceCreation;
-import org.eclipse.jdt.core.dom.ConstructorInvocation;
-import org.eclipse.jdt.core.dom.IAnnotationBinding;
-import org.eclipse.jdt.core.dom.IBinding;
-import org.eclipse.jdt.core.dom.IMemberValuePairBinding;
-import org.eclipse.jdt.core.dom.IMethodBinding;
-import org.eclipse.jdt.core.dom.ITypeBinding;
-import org.eclipse.jdt.core.dom.IVariableBinding;
-import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
-import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
-import org.eclipse.jdt.internal.core.JavaProject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/** @author Evgen Vidolob */
-@Singleton
-public class JavadocFinder {
- private static final Logger LOG = LoggerFactory.getLogger(JavadocFinder.class);
- private static final long LABEL_FLAGS =
- JavaElementLabels.ALL_FULLY_QUALIFIED
- | JavaElementLabels.M_PRE_RETURNTYPE
- | JavaElementLabels.M_PARAMETER_ANNOTATIONS
- | JavaElementLabels.M_PARAMETER_TYPES
- | JavaElementLabels.M_PARAMETER_NAMES
- | JavaElementLabels.M_EXCEPTIONS
- | JavaElementLabels.F_PRE_TYPE_SIGNATURE
- | JavaElementLabels.M_PRE_TYPE_PARAMETERS
- | JavaElementLabels.T_TYPE_PARAMETERS
- | JavaElementLabels.USE_RESOLVED;
- private static final long LOCAL_VARIABLE_FLAGS =
- LABEL_FLAGS & ~JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
- private static final long TYPE_PARAMETER_FLAGS =
- LABEL_FLAGS | JavaElementLabels.TP_POST_QUALIFIED;
- private static final long PACKAGE_FLAGS = LABEL_FLAGS & ~JavaElementLabels.ALL_FULLY_QUALIFIED;
- private static String styleSheet;
- private String baseHref;
-
- public JavadocFinder(String baseHref) {
- this.baseHref = baseHref;
- }
-
- private static long getHeaderFlags(IJavaElement element) {
- switch (element.getElementType()) {
- case IJavaElement.LOCAL_VARIABLE:
- return LOCAL_VARIABLE_FLAGS;
- case IJavaElement.TYPE_PARAMETER:
- return TYPE_PARAMETER_FLAGS;
- case IJavaElement.PACKAGE_FRAGMENT:
- return PACKAGE_FLAGS;
- default:
- return LABEL_FLAGS;
- }
- }
-
- private static IBinding resolveBinding(ASTNode node) {
- if (node instanceof SimpleName) {
- SimpleName simpleName = (SimpleName) node;
- // workaround for https://bugs.eclipse.org/62605 (constructor name resolves to type, not
- // method)
- ASTNode normalized = ASTNodes.getNormalizedNode(simpleName);
- if (normalized.getLocationInParent() == ClassInstanceCreation.TYPE_PROPERTY) {
- ClassInstanceCreation cic = (ClassInstanceCreation) normalized.getParent();
- IMethodBinding constructorBinding = cic.resolveConstructorBinding();
- if (constructorBinding == null) return null;
- ITypeBinding declaringClass = constructorBinding.getDeclaringClass();
- if (!declaringClass.isAnonymous()) return constructorBinding;
- ITypeBinding superTypeDeclaration = declaringClass.getSuperclass().getTypeDeclaration();
- return resolveSuperclassConstructor(superTypeDeclaration, constructorBinding);
- }
- return simpleName.resolveBinding();
-
- } else if (node instanceof SuperConstructorInvocation) {
- return ((SuperConstructorInvocation) node).resolveConstructorBinding();
- } else if (node instanceof ConstructorInvocation) {
- return ((ConstructorInvocation) node).resolveConstructorBinding();
- } else {
- return null;
- }
- }
-
- private static IBinding resolveSuperclassConstructor(
- ITypeBinding superClassDeclaration, IMethodBinding constructor) {
- IMethodBinding[] methods = superClassDeclaration.getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- IMethodBinding method = methods[i];
- if (method.isConstructor() && constructor.isSubsignature(method)) return method;
- }
- return null;
- }
-
- private static StringBuffer addLink(StringBuffer buf, String uri, String label) {
- return buf.append(JavaElementLinks.createLink(uri, label));
- }
-
- private static String getImageURL(IJavaElement element) {
- String imageName = null;
- // todo
- URL imageUrl = null; // JavaPlugin.getDefault().getImagesOnFSRegistry().getImageURL(element);
- if (imageUrl != null) {
- imageName = imageUrl.toExternalForm();
- }
-
- return imageName;
- }
-
- public String findJavadoc4Handle(IJavaProject project, String handle) {
- IJavaElement javaElement = JavaElementLinks.parseURI(handle, (JavaProject) project);
- if (javaElement == null || !(javaElement instanceof IMember)) {
- return null;
- }
- return getJavadoc((IMember) javaElement);
- }
-
- public String findJavadoc(IJavaProject project, String fqn, int offset)
- throws JavaModelException {
-
- IMember member = null;
- IType type = project.findType(fqn);
- ICodeAssist codeAssist;
- if (type.isBinary()) {
- codeAssist = type.getClassFile();
- } else {
- codeAssist = type.getCompilationUnit();
- }
-
- IJavaElement[] elements = null;
- if (codeAssist != null) {
- elements = codeAssist.codeSelect(/*region.getOffset(), region.getLength()*/ offset, 0);
- }
- IJavaElement element = null;
- if (elements != null && elements.length > 0) {
- element = elements[0];
- }
-
- if (element != null && element instanceof IMember) {
- member = ((IMember) element);
- }
- if (member == null) {
- return null;
- }
- return getJavadoc(member);
- }
-
- private String getJavadoc(IMember element) {
- StringBuffer buffer = new StringBuffer();
- boolean hasContents = false;
- if (element instanceof IPackageFragment || element instanceof IMember) {
- HTMLPrinter.addSmallHeader(buffer, getInfoText(element, element.getTypeRoot(), true));
- buffer.append(" Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core;
-
-import java.util.StringTokenizer;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaModelStatus;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.core.compiler.InvalidInputException;
-import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
-import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
-import org.eclipse.jdt.internal.compiler.parser.Scanner;
-import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
-import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
-import org.eclipse.jdt.internal.core.JavaModelStatus;
-import org.eclipse.jdt.internal.core.util.Messages;
-
-/**
- * Provides methods for checking Java-specific conventions such as name syntax.
- *
- * This class provides static methods and constants only.
- *
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public final class JavaConventions {
-
- private static final char DOT = '.';
- private static final String PACKAGE_INFO = new String(TypeConstants.PACKAGE_INFO_NAME);
- private static final Scanner SCANNER =
- new Scanner(
- false /*comment*/,
- true /*whitespace*/,
- false /*nls*/,
- ClassFileConstants.JDK1_3 /*sourceLevel*/,
- null /*taskTag*/,
- null /*taskPriorities*/,
- true /*taskCaseSensitive*/);
-
- private JavaConventions() {
- // Not instantiable
- }
-
- /**
- * Returns whether the given package fragment root paths are considered to overlap.
- *
- * Two root paths overlap if one is a prefix of the other, or they point to the same location.
- * However, a JAR is allowed to be nested in a root.
- *
- * @param rootPath1 the first root path
- * @param rootPath2 the second root path
- * @return true if the given package fragment root paths are considered to overlap, false
- * otherwise
- * @deprecated Overlapping roots are allowed in 2.1
- */
- public static boolean isOverlappingRoots(IPath rootPath1, IPath rootPath2) {
- if (rootPath1 == null || rootPath2 == null) {
- return false;
- }
- return rootPath1.isPrefixOf(rootPath2) || rootPath2.isPrefixOf(rootPath1);
- }
-
- /*
- * Returns the current identifier extracted by the scanner (without unicode
- * escapes) from the given id and for the given source and compliance levels.
- * Returns A compilation unit name must obey the following rules:
- *
- * A compilation unit name must obey the following rules:
- *
- * A .class file name must obey the following rules:
- *
- * A .class file name must obey the following rules:
- *
- * Syntax of a field name corresponds to VariableDeclaratorId (JLS2 8.3). For example, Syntax of a field name corresponds to VariableDeclaratorId (JLS2 8.3). For example, The name of an import corresponds to a fully qualified type name or an on-demand package
- * name as defined by ImportDeclaration (JLS2 7.5). For example, The name of an import corresponds to a fully qualified type name or an on-demand package
- * name as defined by ImportDeclaration (JLS2 7.5). For example,
- *
- * @param name the name of a type
- * @return a status object with code For example, The source level and compliance level values should be taken from the constant defined
- * inside {@link org.eclipse.jdt.core.JavaCore} class. The constants are named The syntax for a method name is defined by Identifier of MethodDeclarator (JLS2 8.4). For
- * example "println".
- *
- * @param name the name of a method
- * @return a status object with code The syntax for a method name is defined by Identifier of MethodDeclarator (JLS2 8.4). For
- * example "println".
- *
- * @param name the name of a method
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code The syntax of a package name corresponds to PackageName as defined by PackageDeclaration
- * (JLS2 7.4). For example, Note that the given name must be a non-empty package name (that is, attempting to validate
- * the default package will return an error status.) Also it must not contain any characters or
- * substrings that are not valid on the file system on which workspace root is located.
- *
- * @param name the name of a package
- * @return a status object with code The syntax of a package name corresponds to PackageName as defined by PackageDeclaration
- * (JLS2 7.4). For example, Note that the given name must be a non-empty package name (that is, attempting to validate
- * the default package will return an error status.) Also it must not contain any characters or
- * substrings that are not valid on the file system on which workspace root is located.
- *
- * @param name the name of a package
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code This validation is intended to anticipate classpath issues prior to assigning it to a
- * project. In particular, it will automatically be performed during the classpath setting
- * operation (if validation fails, the classpath setting will not complete).
- *
- *
- *
- * @param javaProject the given java project
- * @param rawClasspath the given classpath
- * @param projectOutputLocation the given output location
- * @return a status object with code Syntax of a type variable name corresponds to a Java identifier (JLS3 4.3). For example,
- * Syntax of a type variable name corresponds to a Java identifier (JLS3 4.3). For example,
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.formatter.CodeFormatter;
-import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
-import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
-import org.eclipse.jdt.core.util.ClassFormatException;
-import org.eclipse.jdt.core.util.IClassFileReader;
-import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
-import org.eclipse.jdt.internal.compiler.util.Util;
-import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
-import org.eclipse.jdt.internal.core.JavaElement;
-import org.eclipse.jdt.internal.core.JavaModelManager;
-import org.eclipse.jdt.internal.core.PackageFragment;
-import org.eclipse.jdt.internal.core.util.ClassFileReader;
-import org.eclipse.jdt.internal.core.util.Disassembler;
-import org.eclipse.jdt.internal.formatter.DefaultCodeFormatter;
-
-/**
- * Factory for creating various compiler tools, such as scanners, parsers and compilers.
- *
- * This class provides static methods only.
- *
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-@SuppressWarnings({"rawtypes", "unchecked"})
-public class ToolFactory {
-
- /**
- * This mode is used for formatting new code when some formatter options should not be used. In
- * particular, options that preserve the indentation of comments are not used. In the future,
- * newly added options may be ignored as well.
- *
- * Clients that are formatting new code are recommended to use this mode.
- *
- * @see
- * org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants#FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN
- * @see
- * org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants#FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN
- * @see #createCodeFormatter(java.util.Map, int)
- * @since 3.3
- */
- public static final int M_FORMAT_NEW = new Integer(0).intValue();
-
- /**
- * This mode is used for formatting existing code when all formatter options should be used. In
- * particular, options that preserve the indentation of comments are used.
- *
- * Clients that are formatting existing code are recommended to use this mode.
- *
- * @see
- * org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants#FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN
- * @see
- * org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants#FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN
- * @see #createCodeFormatter(java.util.Map, int)
- * @since 3.3
- */
- public static final int M_FORMAT_EXISTING = new Integer(1).intValue();
-
- // /**
- // * Create an instance of a code formatter. A code formatter implementation can be
- // contributed via the
- // * extension point "org.eclipse.jdt.core.codeFormatter". If unable to find a registered
- // extension, the factory
- // * will default to using the default code formatter.
- // *
- // * @return an instance of a code formatter
- // * @see org.eclipse.jdt.core.ICodeFormatter
- // * @see org.eclipse.jdt.core.ToolFactory#createDefaultCodeFormatter(java.util.Map)
- // * @deprecated The extension point has been deprecated, use {@link
- // #createCodeFormatter(java.util.Map)} instead.
- // */
- // public static ICodeFormatter createCodeFormatter() {
- //
- // Plugin jdtCorePlugin = org.eclipse.jdt.core.JavaCore.getPlugin();
- // if (jdtCorePlugin == null) return null;
- //
- // IExtensionPoint extension =
- // jdtCorePlugin.getDescriptor().getExtensionPoint(JavaModelManager.FORMATTER_EXTPOINT_ID);
- // if (extension != null) {
- // IExtension[] extensions = extension.getExtensions();
- // for (int i = 0; i < extensions.length; i++) {
- // IConfigurationElement[] configElements =
- // extensions[i].getConfigurationElements();
- // for (int j = 0; j < configElements.length; j++) {
- // try {
- // Object execExt = configElements[j].createExecutableExtension("class");
- // //$NON-NLS-1$
- // if (execExt instanceof ICodeFormatter) {
- // // use first contribution found
- // return (ICodeFormatter)execExt;
- // }
- // } catch (CoreException e) {
- // // unable to instantiate extension, will answer default formatter
- // instead
- // }
- // }
- // }
- // }
- // // no proper contribution found, use default formatter
- // return createDefaultCodeFormatter(null);
- // }
- //
- /**
- * Create an instance of the built-in code formatter.
- *
- * The given options should at least provide the source level ({@link
- * org.eclipse.jdt.core.JavaCore#COMPILER_SOURCE}), the compiler compliance level ({@link
- * org.eclipse.jdt.core.JavaCore#COMPILER_COMPLIANCE}) and the target platform ({@link
- * org.eclipse.jdt.core.JavaCore#COMPILER_CODEGEN_TARGET_PLATFORM}). Without these options, it is
- * not possible for the code formatter to know what kind of source it needs to format.
- *
- * Note this is equivalent to The given options should at least provide the source level ({@link
- * org.eclipse.jdt.core.JavaCore#COMPILER_SOURCE}), the compiler compliance level ({@link
- * org.eclipse.jdt.core.JavaCore#COMPILER_COMPLIANCE}) and the target platform ({@link
- * org.eclipse.jdt.core.JavaCore#COMPILER_CODEGEN_TARGET_PLATFORM}). Without these options, it is
- * not possible for the code formatter to know what kind of source it needs to format.
- *
- * The given mode determines what options should be enabled when formatting the code. It can
- * have the following values: {@link #M_FORMAT_NEW}, {@link #M_FORMAT_EXISTING}, but other values
- * may be added in the future.
- *
- * @param options the options map to use for formatting with the default code formatter.
- * Recognized options are documented on The decoding flags are described in IClassFileReader.
- *
- * @param classfile the classfile element to introspect
- * @param decodingFlag the flag used to decode the class file reader.
- * @return a default classfile reader
- * @see org.eclipse.jdt.core.util.IClassFileReader
- */
- public static IClassFileReader createDefaultClassFileReader(
- IClassFile classfile, int decodingFlag) {
-
- IPackageFragmentRoot root =
- (IPackageFragmentRoot) classfile.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
- if (root != null) {
- try {
- if (root instanceof JarPackageFragmentRoot) {
- String archiveName = null;
- ZipFile jar = null;
- try {
- jar = ((JarPackageFragmentRoot) root).getJar();
- archiveName = jar.getName();
- } finally {
- JavaModelManager.getJavaModelManager().closeZipFile(jar);
- }
- PackageFragment packageFragment = (PackageFragment) classfile.getParent();
- String classFileName = classfile.getElementName();
- String entryName =
- org.eclipse.jdt.internal.core.util.Util.concatWith(
- packageFragment.names, classFileName, '/');
- return createDefaultClassFileReader(archiveName, entryName, decodingFlag);
- } else {
- InputStream in = null;
- try {
- in = ((IFile) ((JavaElement) classfile).resource()).getContents();
- return createDefaultClassFileReader(in, decodingFlag);
- } finally {
- if (in != null)
- try {
- in.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- } catch (CoreException e) {
- // unable to read
- }
- }
- return null;
- }
-
- /**
- * Create a default classfile reader, able to expose the internal representation of a given
- * classfile according to the decoding flag used to initialize the reader. Answer null if the
- * input stream contents cannot be retrieved
- *
- * The decoding flags are described in IClassFileReader.
- *
- * @param stream the given input stream to read
- * @param decodingFlag the flag used to decode the class file reader.
- * @return a default classfile reader
- * @see org.eclipse.jdt.core.util.IClassFileReader
- * @since 3.2
- */
- public static IClassFileReader createDefaultClassFileReader(
- InputStream stream, int decodingFlag) {
- try {
- return new ClassFileReader(Util.getInputStreamAsByteArray(stream, -1), decodingFlag);
- } catch (ClassFormatException e) {
- return null;
- } catch (IOException e) {
- return null;
- }
- }
-
- /**
- * Create a default classfile reader, able to expose the internal representation of a given
- * classfile according to the decoding flag used to initialize the reader. Answer null if the file
- * named fileName doesn't represent a valid .class file. The fileName has to be an absolute OS
- * path to the given .class file.
- *
- * The decoding flags are described in IClassFileReader.
- *
- * @param fileName the name of the file to be read
- * @param decodingFlag the flag used to decode the class file reader.
- * @return a default classfile reader
- * @see org.eclipse.jdt.core.util.IClassFileReader
- */
- public static IClassFileReader createDefaultClassFileReader(String fileName, int decodingFlag) {
- try {
- return new ClassFileReader(Util.getFileByteContent(new File(fileName)), decodingFlag);
- } catch (ClassFormatException e) {
- return null;
- } catch (IOException e) {
- return null;
- }
- }
-
- /**
- * Create a default classfile reader, able to expose the internal representation of a given
- * classfile according to the decoding flag used to initialize the reader. Answer null if the file
- * named zipFileName doesn't represent a valid zip file or if the zipEntryName is not a valid
- * entry name for the specified zip file or if the bytes don't represent a valid .class file
- * according to the JVM specifications.
- *
- * The decoding flags are described in IClassFileReader.
- *
- * @param zipFileName the name of the zip file
- * @param zipEntryName the name of the entry in the zip file to be read
- * @param decodingFlag the flag used to decode the class file reader.
- * @return a default classfile reader
- * @see org.eclipse.jdt.core.util.IClassFileReader
- */
- public static IClassFileReader createDefaultClassFileReader(
- String zipFileName, String zipEntryName, int decodingFlag) {
- ZipFile zipFile = null;
- try {
- if (JavaModelManager.ZIP_ACCESS_VERBOSE) {
- System.out.println(
- "("
- + Thread.currentThread()
- + ") [ToolFactory.createDefaultClassFileReader()] Creating ZipFile on "
- + zipFileName); // $NON-NLS-1$ //$NON-NLS-2$
- }
- zipFile = new ZipFile(zipFileName);
- ZipEntry zipEntry = zipFile.getEntry(zipEntryName);
- if (zipEntry == null) {
- return null;
- }
- if (!zipEntryName.toLowerCase().endsWith(SuffixConstants.SUFFIX_STRING_class)) {
- return null;
- }
- byte classFileBytes[] = Util.getZipEntryByteContent(zipEntry, zipFile);
- return new ClassFileReader(classFileBytes, decodingFlag);
- } catch (ClassFormatException e) {
- return null;
- } catch (IOException e) {
- return null;
- } finally {
- if (zipFile != null) {
- try {
- zipFile.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
-
- // /**
- // * Create an instance of the default code formatter.
- // *
- // * @param options - the options map to use for formatting with the default code formatter.
- // Recognized options
- // * are documented on By default the compliance used to create the scanner is the workspace's compliance when
- // running inside the IDE
- // * or 1.4 if running from outside of a headless eclipse.
- // * By default the compliance used to create the scanner is the workspace's compliance when
- // running inside the IDE
- // * or 1.4 if running from outside of a headless eclipse.
- // * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import java.io.File;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Represents a particular type of VM for which there may be any number of VM installations. An
- * example of a VM type is the standard JRE which might have instances corresponding to different
- * installed versions such as JRE 1.2.2 and JRE 1.3.
- *
- * This interface is intended to be implemented by clients that contribute to the For example, an implementation might check whether the VM executable is present.
- *
- * @param installLocation the root directory of a potential installation for this type of VM
- * @return a status object describing whether the install location is valid
- */
- IStatus validateInstallLocation(File installLocation);
-
- /**
- * Tries to detect an installed VM that matches this VM install type. Typically, this method will
- * detect the VM installation the Eclipse platform runs on. Implementers should return Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.che.jdt.core.launching.environments.IExecutionEnvironment;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.osgi.util.NLS;
-
-/** JRE Container - resolves a classpath container variable to a JRE */
-public class JREContainer implements IClasspathContainer {
-
- /** Corresponding JRE */
- private IVMInstallType fVMInstall = null;
-
- /** Container path used to resolve to this JRE */
- private IPath fPath = null;
-
- /** The project this container is for */
- private IJavaProject fProject = null;
-
- /** Cache of classpath entries per VM install. Cleared when a VM changes. */
- private static Map Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.ClasspathContainerInitializer;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-
-/** @author Evgen Vidolob */
-public class JREContainerInitializer extends ClasspathContainerInitializer {
-
- public static String JRE_CONTAINER = "org.eclipse.jdt.launching.JRE_CONTAINER";
- private static StandardVMType standardVMType = new StandardVMType();
-
- @Override
- public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
- if (containerPath.segment(0).equals(JRE_CONTAINER)) {
- IClasspathContainer container = new JREContainer(standardVMType, containerPath, project);
- JavaCore.setClasspathContainer(
- containerPath, new IJavaProject[] {project}, new IClasspathContainer[] {container}, null);
- }
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JavaRuntime.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JavaRuntime.java
deleted file mode 100644
index b1a3e7e3e8f..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JavaRuntime.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import org.eclipse.che.jdt.core.launching.environments.ExecutionEnvironment;
-import org.eclipse.che.jdt.core.launching.environments.IExecutionEnvironment;
-
-/** @author Evgen Vidolob */
-public class JavaRuntime {
-
- private static final IExecutionEnvironment environment = new ExecutionEnvironment();
-
- public static IExecutionEnvironment getEnvironment(String environmentId) {
- return environment;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/Launching.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/Launching.java
deleted file mode 100644
index 449206d7ae3..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/Launching.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/** @author Evgen Vidolob */
-public class Launching {
- private static final Logger LOG = LoggerFactory.getLogger(Launching.class);
- /** The id of the JDT launching plug-in (value The resulting XML is compatible with the static method Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-/** Stores the boot path and extension directories associated with a VM. */
-public class LibraryInfo {
-
- private String fVersion;
- private String[] fBootpath;
- private String[] fExtensionDirs;
- private String[] fEndorsedDirs;
-
- public LibraryInfo(String version, String[] bootpath, String[] extDirs, String[] endDirs) {
- fVersion = version;
- fBootpath = bootpath;
- fExtensionDirs = extDirs;
- fEndorsedDirs = endDirs;
- }
-
- /**
- * Returns the version of this VM install.
- *
- * @return version
- */
- public String getVersion() {
- return fVersion;
- }
-
- /**
- * Returns a collection of extension directory paths for this VM install.
- *
- * @return a collection of absolute paths
- */
- public String[] getExtensionDirs() {
- return fExtensionDirs;
- }
-
- /**
- * Returns a collection of bootpath entries for this VM install.
- *
- * @return a collection of absolute paths
- */
- public String[] getBootpath() {
- return fBootpath;
- }
-
- /**
- * Returns a collection of endorsed directory paths for this VM install.
- *
- * @return a collection of absolute paths
- */
- public String[] getEndorsedDirs() {
- return fEndorsedDirs;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/LibraryLocation.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/LibraryLocation.java
deleted file mode 100644
index 7b6484bc840..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/LibraryLocation.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2013 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import java.net.URL;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * The location of a library (for example rt.jar).
- *
- * Clients may instantiate this class.
- */
-public final class LibraryLocation {
- private IPath fSystemLibrary;
- private IPath fSystemLibrarySource;
- private IPath fPackageRootPath;
- private URL fJavadocLocation;
- private URL fIndexLocation;
-
- /**
- * Creates a new library location.
- *
- * @param libraryPath The location of the JAR containing java.lang.Object Must not be Contributors: IBM Corporation - initial API and implementation Michael Allman - Bug 211648,
- * Bug 156343 - Standard VM not supported on MacOS Thomas Schindl - Bug 399798, StandardVMType
- * should allow to contribute default source and Javadoc locations for ext libraries Mikhail Kalkov
- * - Bug 414285, On systems with large RAM, evaluateSystemProperties and generateLibraryInfo fail
- * for 64-bit JREs *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/** A VM install type for VMs the conform to the standard JDK installation layout. */
-public class StandardVMType implements IVMInstallType {
-
- private static final Logger LOG = LoggerFactory.getLogger(Launching.class);
- /** Constants for common {@link String}s */
- private static final String RT_JAR = "rt.jar"; // $NON-NLS-1$
-
- private static final String SRC = "src"; // $NON-NLS-1$
- private static final String SRC_ZIP = "src.zip"; // $NON-NLS-1$
- private static final String SRC_JAR = "src.jar"; // $NON-NLS-1$
- private static final String JRE = "jre"; // $NON-NLS-1$
- private static final String LIB = "lib"; // $NON-NLS-1$
- private static final String BAR = "|"; // $NON-NLS-1$
-
- public static final String ID_STANDARD_VM_TYPE =
- "org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"; // $NON-NLS-1$
-
- /**
- * The minimal -Xmx size for launching a JVM. Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching.environments;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import org.eclipse.che.jdt.core.launching.IVMInstallType;
-import org.eclipse.che.jdt.core.launching.LibraryLocation;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.osgi.framework.Constants;
-
-/**
- * Creates default access rules for standard execution environments based on OSGi profiles.
- *
- * @since 3.3
- */
-public class DefaultAccessRuleParticipant implements IAccessRuleParticipant {
-
- /** Cache of access rules per environment. Re-use rules between projects. */
- private static Map Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching.environments;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.che.jdt.core.launching.IVMInstallType;
-import org.eclipse.che.jdt.core.launching.LibraryLocation;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-
-/**
- * A contributed execution environment.
- *
- * @since 3.2
- */
-public class ExecutionEnvironment implements IExecutionEnvironment {
-
- // /**
- // * Add a VM changed listener to clear cached values when a VM changes or is removed
- // */
- // private IVMInstallChangedListener fListener = new IVMInstallChangedListener() {
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#defaultVMInstallChanged(org.eclipse.jdt.launching.IVMInstall, org
- // * .eclipse.jdt.launching.IVMInstall)
- // */
- // public void defaultVMInstallChanged(IVMInstall previous, IVMInstall current) {
- // }
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#vmAdded(org.eclipse.jdt.launching.IVMInstall)
- // */
- // public void vmAdded(IVMInstall newVm) {
- // }
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#vmChanged(org.eclipse.jdt.launching.PropertyChangeEvent)
- // */
- // public void vmChanged(PropertyChangeEvent event) {
- // if (event.getSource() != null) {
- // fParticipantMap.remove(event.getSource());
- // fRuleCache.remove(event.getSource());
- // }
- // }
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#vmRemoved(org.eclipse.jdt.launching.IVMInstall)
- // */
- // public void vmRemoved(IVMInstall removedVm) {
- // fParticipantMap.remove(removedVm);
- // fRuleCache.remove(removedVm);
- // }
- // };
- //
- //
- // /**
- // * The backing Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching.environments;
-
-import org.eclipse.che.jdt.core.launching.IVMInstallType;
-import org.eclipse.che.jdt.core.launching.LibraryLocation;
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IJavaProject;
-
-/**
- * Contributes access rules for an execution environment. Contributed with an execution environments
- * extension.
- *
- * Clients contributing an access rule participant may implement this interface.
- *
- * @since 3.3
- */
-public interface IAccessRuleParticipant {
-
- /**
- * Returns a collection of access rules to be applied to the specified VM libraries and execution
- * environment in the context of the given project. An array of access rules is returned for each
- * library specified by Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.launching.environments;
-
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.che.jdt.core.launching.IVMInstallType;
-import org.eclipse.che.jdt.core.launching.LibraryLocation;
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IJavaProject;
-
-/**
- * An execution environment describes capabilities of a Java runtime environment ( An execution environment is contributed in plug-in XML via the Clients contributing execution environments may provide and implement execution environment
- * analyzer delegates.
- *
- * @since 3.2
- * @see IExecutionEnvironmentAnalyzerDelegate
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IExecutionEnvironment {
-
- /**
- * Returns a unique identifier for this execution environment. Corresponds to the Access rules for an execution environment are defined by access rule participants
- * contributed in a Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.resources;
-
-import java.io.File;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * A resource delta represents changes in the state of a resource tree between two discrete points
- * in time.
- *
- * Resource deltas implement the For additions ( For changes ( For removals ( For phantom additions and removals ( Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.resources;
-
-import java.io.File;
-import org.eclipse.che.api.project.server.notification.ProjectCreatedEvent;
-import org.eclipse.che.api.project.server.notification.ProjectItemModifiedEvent;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceDelta;
-
-/** @author Evgen Vidolob */
-public class ResourceChangedEvent implements IResourceChangeEvent {
-
- private ResourceDeltaImpl resourceDelta;
-
- public ResourceChangedEvent(File workspace, ProjectItemModifiedEvent event) {
- resourceDelta = new ResourceDeltaImpl(workspace, event);
- }
-
- public ResourceChangedEvent(File workspace, ProjectCreatedEvent event) {
- resourceDelta = new ResourceDeltaImpl(workspace, event);
- }
-
- @Override
- public IMarkerDelta[] findMarkerDeltas(String s, boolean b) {
- return new IMarkerDelta[0];
- }
-
- @Override
- public int getBuildKind() {
- return 0;
- }
-
- @Override
- public IResourceDelta getDelta() {
- return resourceDelta;
- }
-
- @Override
- public IResource getResource() {
- return resourceDelta.getResource();
- }
-
- @Override
- public Object getSource() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int getType() {
- return POST_CHANGE;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/resources/ResourceDeltaImpl.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/resources/ResourceDeltaImpl.java
deleted file mode 100644
index 0f05607dd6e..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/resources/ResourceDeltaImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Red Hat, Inc. - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.core.resources;
-
-import java.io.File;
-import org.eclipse.che.api.project.server.notification.ProjectCreatedEvent;
-import org.eclipse.che.api.project.server.notification.ProjectItemModifiedEvent;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/** @author Evgen Vidolob */
-public class ResourceDeltaImpl implements IResourceDelta {
-
- protected static int KIND_MASK = 0xFF;
- private File workspace;
- private String path;
- protected int status;
-
- public ResourceDeltaImpl(File workspace, ProjectItemModifiedEvent event) {
- this.workspace = workspace;
- path = event.getPath();
-
- switch (event.getType()) {
- case UPDATED:
- status |= CHANGED | CONTENT;
- break;
- case CREATED:
- status |= ADDED;
- break;
- case DELETED:
- status |= REMOVED;
- break;
- default:
- }
- }
-
- public ResourceDeltaImpl(File workspace, ProjectCreatedEvent event) {
- this.workspace = workspace;
- path = event.getProjectPath();
- status |= ADDED;
- }
-
- @Override
- public File getFile() {
- return new File(workspace, path);
- }
-
- @Override
- public void accept(IResourceDeltaVisitor iResourceDeltaVisitor) throws CoreException {}
-
- @Override
- public void accept(IResourceDeltaVisitor iResourceDeltaVisitor, boolean b) throws CoreException {}
-
- @Override
- public void accept(IResourceDeltaVisitor visitor, int memberFlags) throws CoreException {
- final boolean includePhantoms = (memberFlags & IContainer.INCLUDE_PHANTOMS) != 0;
- // final boolean includeTeamPrivate = (memberFlags &
- // IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS) != 0;
- // final boolean includeHidden = (memberFlags & IContainer.INCLUDE_HIDDEN) != 0;
- // int mask = includePhantoms ? ALL_WITH_PHANTOMS : REMOVED | ADDED | CHANGED;
- // if ((getKind() & mask) == 0)
- // return;
- // if (!visitor.visit(this))
- // return;
- visitor.visit(this);
- }
-
- @Override
- public org.eclipse.core.resources.IResourceDelta findMember(IPath iPath) {
- return null;
- }
-
- @Override
- public org.eclipse.core.resources.IResourceDelta[] getAffectedChildren() {
- return new IResourceDelta[0];
- }
-
- @Override
- public org.eclipse.core.resources.IResourceDelta[] getAffectedChildren(int i) {
- return new IResourceDelta[0];
- }
-
- @Override
- public org.eclipse.core.resources.IResourceDelta[] getAffectedChildren(int i, int i1) {
- return new IResourceDelta[0];
- }
-
- @Override
- public int getFlags() {
- return status & ~KIND_MASK;
- }
-
- @Override
- public IPath getFullPath() {
- return null;
- }
-
- @Override
- public int getKind() {
- return status & KIND_MASK;
- }
-
- @Override
- public IMarkerDelta[] getMarkerDeltas() {
- return new IMarkerDelta[0];
- }
-
- @Override
- public IPath getMovedFromPath() {
- return null;
- }
-
- @Override
- public IPath getMovedToPath() {
- return null;
- }
-
- @Override
- public IPath getProjectRelativePath() {
- return null;
- }
-
- @Override
- public IResource getResource() {
- return ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
- }
-
- @Override
- public Object getAdapter(Class aClass) {
- return null;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/dom/ASTFlattener.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/dom/ASTFlattener.java
deleted file mode 100644
index fbcfeeea626..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/dom/ASTFlattener.java
+++ /dev/null
@@ -1,1796 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- * *****************************************************************************
- */
-package org.eclipse.che.jdt.dom;
-
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jdt.core.dom.*;
-import org.eclipse.jdt.internal.corext.dom.GenericVisitor;
-
-public class ASTFlattener extends GenericVisitor {
-
- /** @deprecated to avoid deprecation warnings */
- private static final int JLS3 = AST.JLS3;
- /** @deprecated to avoid deprecation warnings */
- private static final int JLS4 = AST.JLS4;
-
- /** The string buffer into which the serialized representation of the AST is written. */
- protected StringBuffer fBuffer;
-
- /** Creates a new AST printer. */
- public ASTFlattener() {
- this.fBuffer = new StringBuffer();
- }
-
- public static String asString(ASTNode node) {
- Assert.isTrue(node.getAST().apiLevel() == AST.JLS8);
-
- ASTFlattener flattener = new ASTFlattener();
- node.accept(flattener);
- return flattener.getResult();
- }
-
- /**
- * @param node node
- * @return component type
- * @deprecated to avoid deprecation warning
- */
- private static Type getComponentType(ArrayType node) {
- return node.getComponentType();
- }
-
- /**
- * @param node node
- * @return thrown exception names
- * @deprecated to avoid deprecation warning
- */
- private static Listnull
for workbench
- * encoding.
- */
- protected String fEncoding;
- /** Internal document listener */
- protected IDocumentListener fDocumentListener = new DocumentListener();
- /** The encoding which has explicitly been set on the file. */
- private String fExplicitEncoding;
- /** Tells whether the file on disk has a BOM. */
- private boolean fHasBOM;
- /** The annotation model of this file buffer */
- private IAnnotationModel fAnnotationModel;
- /**
- * Lock for lazy creation of annotation model.
- *
- * @since 3.2
- */
- private final Object fAnnotationModelCreationLock = new Object();
- /**
- * Tells whether the cache is up to date.
- *
- * @since 3.2
- */
- private boolean fIsCacheUpdated = false;
-
- public FileStoreTextFileBuffer(TextFileBufferManager manager) {
- super(manager);
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBuffer#getDocument()
- */
- public IDocument getDocument() {
- return fDocument;
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBuffer#getAnnotationModel()
- */
- public IAnnotationModel getAnnotationModel() {
- // synchronized (fAnnotationModelCreationLock) {
- // if (fAnnotationModel == null && !isDisconnected()) {
- // fAnnotationModel = fManager.createAnnotationModel(getLocationOrName(),
- // LocationKind.LOCATION);
- // if (fAnnotationModel != null)
- // fAnnotationModel.connect(fDocument);
- // }
- // }
- // return fAnnotationModel;
- throw new UnsupportedOperationException("getAnnotationModel");
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBuffer#getEncoding()
- */
- public String getEncoding() {
- if (!fIsCacheUpdated) cacheEncodingState();
- return fEncoding;
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBuffer#setEncoding(java.lang.String)
- */
- public void setEncoding(String encoding) {
- fExplicitEncoding = encoding;
- if (encoding == null || encoding.equals(fEncoding)) fIsCacheUpdated = false;
- else {
- fEncoding = encoding;
- fHasBOM = false;
- }
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBuffer#getStatus()
- */
- public IStatus getStatus() {
- if (!isDisconnected()) {
- if (fStatus != null) return fStatus;
- return (fDocument == null ? STATUS_ERROR : Status.OK_STATUS);
- }
- return STATUS_ERROR;
- }
-
- private InputStream getFileContents(IFileStore fileStore) throws CoreException {
- if (!fFileStore.fetchInfo().exists()) return null;
-
- return fileStore.openInputStream(EFS.NONE, null);
- }
-
- private void setFileContents(InputStream stream, IProgressMonitor monitor) throws CoreException {
- OutputStream out = fFileStore.openOutputStream(EFS.NONE, null);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- bytesRead = stream.read(buffer);
- if (bytesRead == -1) {
- out.close();
- break;
- }
- out.write(buffer, 0, bytesRead);
- if (monitor != null) monitor.worked(1);
- }
- } catch (IOException ex) {
- String message = (ex.getMessage() != null ? ex.getMessage() : ""); // $NON-NLS-1$
- IStatus s = new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, ex);
- throw new CoreException(s);
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- } finally {
- try {
- out.close();
- } catch (IOException e) {
- }
- }
- }
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBuffer#revert(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void revert(IProgressMonitor monitor) throws CoreException {
- if (isDisconnected()) return;
-
- IDocument original = null;
- fStatus = null;
-
- try {
- original = fManager.createEmptyDocument(getLocationOrName(), LocationKind.LOCATION);
- cacheEncodingState();
- setDocumentContent(original, fFileStore, fEncoding, fHasBOM, monitor);
- } catch (CoreException x) {
- fStatus = x.getStatus();
- }
-
- if (original == null) return;
-
- String originalContents = original.get();
- boolean replaceContents = !originalContents.equals(fDocument.get());
-
- if (!replaceContents && !fCanBeSaved) return;
-
- fManager.fireStateChanging(this);
- try {
-
- if (replaceContents) {
- fManager.fireBufferContentAboutToBeReplaced(this);
- fDocument.set(original.get());
- }
-
- boolean fireDirtyStateChanged = fCanBeSaved;
- if (fCanBeSaved) {
- fCanBeSaved = false;
- addFileBufferContentListeners();
- }
-
- if (replaceContents) fManager.fireBufferContentReplaced(this);
-
- IFileInfo info = fFileStore.fetchInfo();
- if (info.exists()) fSynchronizationStamp = fFileStore.fetchInfo().getLastModified();
-
- // if (fAnnotationModel instanceof IPersistableAnnotationModel) {
- // IPersistableAnnotationModel persistableModel =
- // (IPersistableAnnotationModel)fAnnotationModel;
- // try {
- // persistableModel.revert(fDocument);
- // } catch (CoreException x) {
- // fStatus = x.getStatus();
- // }
- // }
-
- if (fireDirtyStateChanged) fManager.fireDirtyStateChanged(this, fCanBeSaved);
-
- } catch (RuntimeException x) {
- fManager.fireStateChangeFailed(this);
- throw x;
- }
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBuffer#getContentType()
- * @since 3.1
- */
- public IContentType getContentType() throws CoreException {
- InputStream stream = null;
- try {
- if (isDirty()) {
- Reader reader = new DocumentReader(getDocument());
- try {
- IContentDescription desc =
- Platform.getContentTypeManager()
- .getDescriptionFor(reader, fFileStore.getName(), NO_PROPERTIES);
- if (desc != null && desc.getContentType() != null) return desc.getContentType();
- } finally {
- try {
- reader.close();
- } catch (IOException ex) {
- }
- }
- }
- stream = fFileStore.openInputStream(EFS.NONE, null);
- IContentDescription desc =
- Platform.getContentTypeManager()
- .getDescriptionFor(stream, fFileStore.getName(), NO_PROPERTIES);
- if (desc != null && desc.getContentType() != null) return desc.getContentType();
- return null;
- } catch (IOException x) {
- throw new CoreException(
- new Status(
- IStatus.ERROR,
- FileBuffersPlugin.PLUGIN_ID,
- IStatus.OK,
- NLSUtility.format(
- FileBuffersMessages.FileBuffer_error_queryContentDescription,
- fFileStore.toString()),
- x));
- } finally {
- try {
- if (stream != null) stream.close();
- } catch (IOException x) {
- }
- }
- }
-
- /*
- * @see org.eclipse.core.internal.filebuffers.FileBuffer#addFileBufferContentListeners()
- */
- protected void addFileBufferContentListeners() {
- if (fDocument != null) fDocument.addDocumentListener(fDocumentListener);
- }
-
- /*
- * @see org.eclipse.core.internal.filebuffers.FileBuffer#removeFileBufferContentListeners()
- */
- protected void removeFileBufferContentListeners() {
- if (fDocument != null) fDocument.removeDocumentListener(fDocumentListener);
- }
-
- /*
- * @see org.eclipse.core.internal.filebuffers.FileBuffer#initializeFileBufferContent(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void initializeFileBufferContent(IProgressMonitor monitor) throws CoreException {
- try {
- fDocument = fManager.createEmptyDocument(getLocationOrName(), LocationKind.LOCATION);
- // cacheEncodingState();
- setDocumentContent(fDocument, fFileStore, fEncoding, fHasBOM, monitor);
- } catch (CoreException x) {
- fDocument = fManager.createEmptyDocument(getLocationOrName(), LocationKind.LOCATION);
- fStatus = x.getStatus();
- }
- }
-
- /*
- * @see org.eclipse.core.internal.filebuffers.ResourceFileBuffer#connected()
- */
- protected void connected() {
- super.connected();
- if (fAnnotationModel != null) fAnnotationModel.connect(fDocument);
- }
-
- /*
- * @see org.eclipse.core.internal.filebuffers.ResourceFileBuffer#disconnected()
- */
- protected void disconnected() {
- if (fAnnotationModel != null) fAnnotationModel.disconnect(fDocument);
- super.disconnected();
- }
-
- protected void cacheEncodingState() {
- fEncoding = fExplicitEncoding;
- fHasBOM = false;
- fIsCacheUpdated = true;
-
- InputStream stream = null;
- try {
- stream = getFileContents(fFileStore);
- if (stream == null) return;
-
- QualifiedName[] options =
- new QualifiedName[] {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK};
- IContentDescription description =
- null; // Platform.getContentTypeManager().getDescriptionFor(stream, fFileStore.getName(),
- // options);
- if (description != null) {
- fHasBOM = description.getProperty(IContentDescription.BYTE_ORDER_MARK) != null;
- if (fEncoding == null) fEncoding = description.getCharset();
- }
- } catch (CoreException e) {
- // do nothing
- } /*catch (IOException e) {
- // do nothing
- }*/ finally {
- try {
- if (stream != null) stream.close();
- } catch (IOException ex) {
- FileBuffersPlugin.getDefault()
- .log(
- new Status(
- IStatus.ERROR,
- FileBuffersPlugin.PLUGIN_ID,
- IStatus.OK,
- FileBuffersMessages.JavaTextFileBuffer_error_closeStream,
- ex));
- }
- }
-
- // Use global default
- if (fEncoding == null) fEncoding = fManager.getDefaultEncoding();
- }
-
- /*
- * @see org.eclipse.core.internal.filebuffers.FileBuffer#commitFileBufferContent(org.eclipse.core.runtime.IProgressMonitor, boolean)
- */
- protected void commitFileBufferContent(IProgressMonitor monitor, boolean overwrite)
- throws CoreException {
- // if (!isSynchronized() && !overwrite)
- // throw new CoreException(new Status(IStatus.WARNING, FileBuffersPlugin.PLUGIN_ID,
- // IResourceStatus.OUT_OF_SYNC_LOCAL, FileBuffersMessages.FileBuffer_error_outOfSync, null));
-
- String encoding = computeEncoding();
-
- Charset charset;
- try {
- charset = Charset.forName(encoding);
- } catch (UnsupportedCharsetException ex) {
- String message =
- NLSUtility.format(
- FileBuffersMessages.ResourceTextFileBuffer_error_unsupported_encoding_message_arg,
- encoding);
- IStatus s = new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, ex);
- throw new CoreException(s);
- } catch (IllegalCharsetNameException ex) {
- String message =
- NLSUtility.format(
- FileBuffersMessages.ResourceTextFileBuffer_error_illegal_encoding_message_arg,
- encoding);
- IStatus s = new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, ex);
- throw new CoreException(s);
- }
-
- CharsetEncoder encoder = charset.newEncoder();
- encoder.onMalformedInput(CodingErrorAction.REPLACE);
- encoder.onUnmappableCharacter(CodingErrorAction.REPORT);
-
- byte[] bytes;
- int bytesLength;
-
- try {
- ByteBuffer byteBuffer = encoder.encode(CharBuffer.wrap(fDocument.get()));
- bytesLength = byteBuffer.limit();
- if (byteBuffer.hasArray()) bytes = byteBuffer.array();
- else {
- bytes = new byte[bytesLength];
- byteBuffer.get(bytes);
- }
- } catch (CharacterCodingException ex) {
- Assert.isTrue(ex instanceof UnmappableCharacterException);
- String message =
- NLSUtility.format(
- FileBuffersMessages.ResourceTextFileBuffer_error_charset_mapping_failed_message_arg,
- encoding);
- IStatus s =
- new Status(
- IStatus.ERROR,
- FileBuffersPlugin.PLUGIN_ID,
- IFileBufferStatusCodes.CHARSET_MAPPING_FAILED,
- message,
- null);
- throw new CoreException(s);
- }
-
- IFileInfo fileInfo = fFileStore.fetchInfo();
- if (fileInfo != null && fileInfo.exists()) {
-
- if (!overwrite) checkSynchronizationState();
-
- InputStream stream = new ByteArrayInputStream(bytes, 0, bytesLength);
-
- /*
- * XXX:
- * This is a workaround for a corresponding bug in Java readers and writer,
- * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
- */
- if (fHasBOM && CHARSET_UTF_8.equals(encoding))
- stream =
- new SequenceInputStream(
- new ByteArrayInputStream(IContentDescription.BOM_UTF_8), stream);
-
- // here the file synchronizer should actually be removed and afterwards added again. However,
- // we are already inside an operation, so the delta is sent AFTER we have added the listener
- setFileContents(stream, monitor);
- // set synchronization stamp to know whether the file synchronizer must become active
- fSynchronizationStamp = fFileStore.fetchInfo().getLastModified();
-
- // if (fAnnotationModel instanceof IPersistableAnnotationModel) {
- // IPersistableAnnotationModel persistableModel= (IPersistableAnnotationModel)
- // fAnnotationModel;
- // persistableModel.commit(fDocument);
- // }
-
- } else {
- fFileStore.getParent().mkdir(EFS.NONE, null);
- OutputStream out = fFileStore.openOutputStream(EFS.NONE, null);
- try {
- /*
- * XXX:
- * This is a workaround for a corresponding bug in Java readers and writer,
- * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
- */
- if (fHasBOM && CHARSET_UTF_8.equals(encoding)) out.write(IContentDescription.BOM_UTF_8);
-
- out.write(bytes, 0, bytesLength);
- out.flush();
- out.close();
- } catch (IOException x) {
- IStatus s =
- new Status(
- IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, x.getLocalizedMessage(), x);
- throw new CoreException(s);
- } finally {
- try {
- out.close();
- } catch (IOException x) {
- }
- }
-
- // set synchronization stamp to know whether the file synchronizer must become active
- fSynchronizationStamp = fFileStore.fetchInfo().getLastModified();
- }
- }
-
- private String computeEncoding() {
- // Make sure cache is up to date
- if (!fIsCacheUpdated) cacheEncodingState();
-
- // User-defined encoding has first priority
- if (fExplicitEncoding != null) return fExplicitEncoding;
-
- // // Probe content
- // Reader reader= new DocumentReader(fDocument);
- // try {
- // QualifiedName[] options= new QualifiedName[] { IContentDescription.CHARSET,
- // IContentDescription.BYTE_ORDER_MARK };
- // IContentDescription description= Platform.getContentTypeManager().getDescriptionFor(reader,
- // fFileStore.getName(), options);
- // if (description != null) {
- // String encoding= description.getCharset();
- // if (encoding != null)
- // return encoding;
- // }
- // } catch (IOException ex) {
- // // Try next strategy
- // } finally {
- // try {
- // reader.close();
- // } catch (IOException x) {
- // }
- // }
-
- // Use file's encoding if the file has a BOM
- if (fHasBOM) return fEncoding;
-
- // Use global default
- return fManager.getDefaultEncoding();
- }
-
- /**
- * Initializes the given document with the given file's content using the given encoding.
- *
- * @param document the document to be initialized
- * @param file the file which delivers the document content
- * @param encoding the character encoding for reading the given stream
- * @param hasBOM tell whether the given file has a BOM
- * @param monitor the progress monitor
- * @exception CoreException if the given stream can not be read
- */
- private void setDocumentContent(
- IDocument document,
- IFileStore file,
- String encoding,
- boolean hasBOM,
- IProgressMonitor monitor)
- throws CoreException {
- InputStream contentStream = getFileContents(file);
- if (contentStream == null) return;
-
- Reader in = null;
- try {
-
- if (encoding == null) encoding = fManager.getDefaultEncoding();
-
- /*
- * XXX:
- * This is a workaround for a corresponding bug in Java readers and writer,
- * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
- */
- if (hasBOM && CHARSET_UTF_8.equals(encoding)) {
- int n = 0;
- do {
- int bytes = contentStream.read(new byte[IContentDescription.BOM_UTF_8.length]);
- if (bytes == -1) throw new IOException();
- n += bytes;
- } while (n < IContentDescription.BOM_UTF_8.length);
- }
-
- in = new BufferedReader(new InputStreamReader(contentStream, encoding), BUFFER_SIZE);
- StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
- char[] readBuffer = new char[READER_CHUNK_SIZE];
- int n = in.read(readBuffer);
- while (n > 0) {
- buffer.append(readBuffer, 0, n);
- n = in.read(readBuffer);
- }
-
- document.set(buffer.toString());
-
- } catch (IOException x) {
- String msg = x.getMessage() == null ? "" : x.getMessage(); // $NON-NLS-1$
- IStatus s = new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, msg, x);
- throw new CoreException(s);
- } finally {
- try {
- if (in != null) in.close();
- else contentStream.close();
- } catch (IOException x) {
- }
- }
- }
-
- /**
- * Checks whether the given file is synchronized with the local file system. If the file has been
- * changed, a CoreException
is thrown.
- *
- * @exception CoreException if file has been changed on the file system
- */
- private void checkSynchronizationState() throws CoreException {
- if (!isSynchronized()) {
- Status status =
- new Status(
- IStatus.ERROR,
- FileBuffersPlugin.PLUGIN_ID,
- 274 /* IResourceStatus.OUT_OF_SYNC_LOCAL */,
- FileBuffersMessages.FileBuffer_error_outOfSync,
- null);
- throw new CoreException(status);
- }
- }
-
- /**
- * Returns the location if it is null
or the name as IPath
otherwise.
- *
- * @return a non-null IPath
- * @since 3.3.1
- */
- private IPath getLocationOrName() {
- IPath path = getLocation();
- if (path == null) path = new Path(fFileStore.getName());
- return path;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/NLSUtility.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/NLSUtility.java
deleted file mode 100644
index 8c6fa511a59..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/NLSUtility.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2006 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
- * @param argument the argument used to format the string
- * @return the formatted string
- */
- public static String format(String message, Object argument) {
- return MessageFormat.format(message, new Object[] {argument});
- }
-
- /**
- * Formats the given string with the given argument.
- *
- * @param message the message to format, must not be null
- * @param arguments the arguments used to format the string
- * @return the formatted string
- */
- public static String format(String message, Object[] arguments) {
- return MessageFormat.format(message, arguments);
- }
-
- private NLSUtility() {
- // Do not instantiate
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/SynchronizableDocument.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/SynchronizableDocument.java
deleted file mode 100644
index 62d4413ee27..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/java/org/eclipse/core/internal/filebuffers/SynchronizableDocument.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * !strict
. If the file store does
- // * not exist, it is checked whether a text content type is associated with
- // * the given location. If no content type is associated with the location,
- // * this method returns !strict
.
- // * true
if a file with unknown content type
- // * is not treated as text file, false
otherwise
- // * @return true
if the location is a text file location
- // * @since 3.3
- // */
- // protected boolean isTextFileLocation(IFileStore fileStore, boolean strict) {
- // if (fileStore == null)
- // return false;
- //
- // IContentTypeManager manager= Platform.getContentTypeManager();
- // IFileInfo fileInfo= fileStore.fetchInfo();
- // if (fileInfo.exists()) {
- // InputStream is= null;
- // try {
- // is= fileStore.openInputStream(EFS.NONE, null);
- // IContentDescription description= manager.getDescriptionFor(is, fileStore.getName(),
- // IContentDescription.ALL);
- // if (description != null) {
- // IContentType type= description.getContentType();
- // if (type != null)
- // return type.isKindOf(TEXT_CONTENT_TYPE);
- // }
- // } catch (CoreException ex) {
- // // ignore: API specification tells return true if content type can't be determined
- // } catch (IOException ex) {
- // // ignore: API specification tells return true if content type can't be determined
- // } finally {
- // if (is != null ) {
- // try {
- // is.close();
- // } catch (IOException e) {
- // // ignore: API specification tells to return true if content type can't be determined
- // }
- // }
- // }
- //
- // return !strict;
- //
- // }
- //
- // IContentType[] contentTypes= manager.findContentTypesFor(fileStore.getName());
- // if (contentTypes != null && contentTypes.length > 0) {
- // for (int i= 0; i < contentTypes.length; i++)
- // if (contentTypes[i].isKindOf(TEXT_CONTENT_TYPE))
- // return true;
- // return false;
- // }
- // return !strict;
- // }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBufferManager#isTextFileLocation(org.eclipse.core.runtime.IPath, boolean)
- * @since 3.2
- */
- public boolean isTextFileLocation(IPath location, boolean strict) {
- // Assert.isNotNull(location);
- // location= normalizeLocation(location);
- // try {
- // return isTextFileLocation(lo, strict);
- // } catch (CoreException ex) {
- // return false;
- // }
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.3, replaced by {@link #getFileBuffer(IPath, LocationKind)}
- */
- public IFileBuffer getFileBuffer(IPath location) {
- return getFileBuffer(location, LocationKind.NORMALIZE);
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#getFileBuffer(org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.IFileBufferManager.LocationKind)
- * @since 3.3
- */
- public IFileBuffer getFileBuffer(IPath location, LocationKind locationKind) {
- if (locationKind == LocationKind.NORMALIZE) location = normalizeLocation(location);
- return internalGetFileBuffer(location);
- }
-
- // /*
- // * @see
- // org.eclipse.core.filebuffers.IFileBufferManager#getFileStoreFileBuffer(org.eclipse.core.filesystem.IFileStore)
- // * @since 3.3
- // */
- // public IFileBuffer getFileStoreFileBuffer(IFileStore fileStore) {
- // Assert.isLegal(fileStore != null);
- // return internalGetFileBuffer(fileStore);
- // }
-
- private AbstractFileBuffer internalGetFileBuffer(IPath location) {
- synchronized (fFilesBuffers) {
- return (AbstractFileBuffer) fFilesBuffers.get(location);
- }
- }
-
- // private FileStoreFileBuffer internalGetFileBuffer(IFileStore fileStore) {
- // synchronized (fFileStoreFileBuffers) {
- // return (FileStoreFileBuffer)fFileStoreFileBuffers.get(fileStore);
- // }
- // }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.3, replaced by {@link #getTextFileBuffer(IPath, LocationKind)}
- */
- public ITextFileBuffer getTextFileBuffer(IPath location) {
- return getTextFileBuffer(location, LocationKind.NORMALIZE);
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBufferManager#getTextFileBuffer(org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.IFileBufferManager.LocationKind)
- * @since 3.3
- */
- public ITextFileBuffer getTextFileBuffer(IPath location, LocationKind locationKind) {
- return (ITextFileBuffer) getFileBuffer(location, locationKind);
- }
- //
- // /*
- // * @see
- // org.eclipse.core.filebuffers.ITextFileBufferManager#getFileStoreTextFileBuffer(org.eclipse.core.filesystem.IFileStore)
- // * @since 3.3
- // */
- // public ITextFileBuffer getFileStoreTextFileBuffer(IFileStore fileStore) {
- // Assert.isLegal(fileStore != null);
- // return (ITextFileBuffer)getFileStoreFileBuffer(fileStore);
- // }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBufferManager#getTextFileBuffer(org.eclipse.jface.text.IDocument)
- * @since 3.3
- */
- public ITextFileBuffer getTextFileBuffer(IDocument document) {
- Assert.isLegal(document != null);
- Iterator iter;
- synchronized (fFilesBuffers) {
- iter = new ArrayList(fFilesBuffers.values()).iterator();
- }
-
- while (iter.hasNext()) {
- Object buffer = iter.next();
- if (buffer instanceof ITextFileBuffer) {
- ITextFileBuffer textFileBuffer = (ITextFileBuffer) buffer;
- if (textFileBuffer.getDocument() == document) {
- if (!((AbstractFileBuffer) textFileBuffer).isDisconnected()) return textFileBuffer;
- return null;
- }
- }
- }
- synchronized (fFileStoreFileBuffers) {
- iter = new ArrayList(fFileStoreFileBuffers.values()).iterator();
- }
- while (iter.hasNext()) {
- Object buffer = iter.next();
- if (buffer instanceof ITextFileBuffer) {
- ITextFileBuffer textFileBuffer = (ITextFileBuffer) buffer;
- if (textFileBuffer.getDocument() == document) {
- if (!((AbstractFileBuffer) textFileBuffer).isDisconnected()) return textFileBuffer;
- }
- }
- }
- return null;
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#getFileBuffers()
- * @since 3.4
- */
- public IFileBuffer[] getFileBuffers() {
- synchronized (fFilesBuffers) {
- Collection values = fFilesBuffers.values();
- return (IFileBuffer[]) values.toArray(new IFileBuffer[values.size()]);
- }
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#getFileStoreFileBuffers()
- * @since 3.4
- */
- public IFileBuffer[] getFileStoreFileBuffers() {
- synchronized (fFileStoreFileBuffers) {
- Collection values = fFileStoreFileBuffers.values();
- return (IFileBuffer[]) values.toArray(new IFileBuffer[values.size()]);
- }
- }
-
- /*
- * @see org.eclipse.core.buffer.text.IBufferedFileManager#getDefaultEncoding()
- */
- public String getDefaultEncoding() {
- return System.getProperty("file.encoding"); // $NON-NLS-1$;
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.3, replaced by {@link #createEmptyDocument(IPath, LocationKind)}
- */
- public IDocument createEmptyDocument(IPath location) {
- return createEmptyDocument(location, LocationKind.NORMALIZE);
- }
-
- /*
- * @see org.eclipse.core.filebuffers.ITextFileBufferManager#createEmptyDocument(org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.LocationKind)
- * @since 3.3
- */
- public IDocument createEmptyDocument(final IPath location, final LocationKind locationKind) {
- // IDocument documentFromFactory= createDocumentFromFactory(location, locationKind);
- final IDocument document;
- // if (documentFromFactory != null)
- // document= documentFromFactory;
- // else
- document = new SynchronizableDocument();
-
- if (location == null) return document;
-
- // Set the initial line delimiter
- if (document instanceof IDocumentExtension4) {
- String initalLineDelimiter = getLineDelimiterPreference(location, locationKind);
- if (initalLineDelimiter != null)
- ((IDocumentExtension4) document).setInitialLineDelimiter(initalLineDelimiter);
- }
-
- // final IDocumentSetupParticipant[] participants=
- // fRegistry.getDocumentSetupParticipants(location, locationKind);
- // if (participants != null) {
- // for (int i= 0; i < participants.length; i++) {
- // final IDocumentSetupParticipant participant= participants[i];
- // ISafeRunnable runnable= new ISafeRunnable() {
- // public void run() throws Exception {
- // if (participant instanceof IDocumentSetupParticipantExtension)
- // ((IDocumentSetupParticipantExtension)participant).setup(document, location,
- // locationKind);
- // else
- // participant.setup(document);
- //
- // if (document.getDocumentPartitioner() != null) {
- // String message=
- // NLSUtility.format(FileBuffersMessages.TextFileBufferManager_warning_documentSetupInstallsDefaultPartitioner, participant.getClass());
- // IStatus status= new Status(IStatus.WARNING, FileBuffersPlugin.PLUGIN_ID, IStatus.OK,
- // message, null);
- // FileBuffersPlugin.getDefault().log(status);
- // }
- // }
- // public void handleException(Throwable t) {
- // IStatus status= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK,
- // FileBuffersMessages.TextFileBufferManager_error_documentSetupFailed, t);
- // FileBuffersPlugin.getDefault().log(status);
- // }
- // };
- // SafeRunner.run(runnable);
- // }
- // }
-
- return document;
- }
-
- // /**
- // * Helper to get rid of deprecation warnings.
- // *
- // * @param location the location of the file to be connected
- // * @param locationKind the kind of the given location
- // * @return the created empty document or null
if none got created
- // * @since 3.5
- // * @deprecated As of 3.5
- // */
- // private IDocument createDocumentFromFactory(final IPath location, final LocationKind
- // locationKind) {
- // final IDocument[] runnableResult= new IDocument[1];
- // if (location != null) {
- // final org.eclipse.core.filebuffers.IDocumentFactory factory=
- // fRegistry.getDocumentFactory(location, locationKind);
- // if (factory != null) {
- // ISafeRunnable runnable= new ISafeRunnable() {
- // public void run() throws Exception {
- // runnableResult[0]= factory.createDocument();
- // }
- // public void handleException(Throwable t) {
- // IStatus status= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK,
- // FileBuffersMessages.TextFileBufferManager_error_documentFactoryFailed, t);
- // FileBuffersPlugin.getDefault().log(status);
- // }
- // };
- // SafeRunner.run(runnable);
- // }
- // }
- // return runnableResult[0];
- // }
-
- // /**
- // * {@inheritDoc}
- // *
- // * @deprecated As of 3.3, replaced by {@link #createAnnotationModel(IPath, LocationKind)}
- // */
- // public IAnnotationModel createAnnotationModel(IPath location) {
- // return createAnnotationModel(location, LocationKind.NORMALIZE);
- // }
-
- // /*
- // * @see
- // org.eclipse.core.filebuffers.ITextFileBufferManager#createAnnotationModel(org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.LocationKind)
- // * @since 3.3
- // */
- // public IAnnotationModel createAnnotationModel(IPath location, LocationKind locationKind) {
- // Assert.isNotNull(location);
- // IAnnotationModelFactory factory= fRegistry.getAnnotationModelFactory(location, locationKind);
- // if (factory != null)
- // return factory.createAnnotationModel(location);
- // return null;
- // }
- //
- // /*
- // * @see
- // org.eclipse.core.filebuffers.IFileBufferManager#addFileBufferListener(org.eclipse.core.filebuffers.IFileBufferListener)
- // */
- // public void addFileBufferListener(IFileBufferListener listener) {
- // Assert.isNotNull(listener);
- // synchronized (fFileBufferListeners) {
- // if (!fFileBufferListeners.contains(listener))
- // fFileBufferListeners.add(listener);
- // }
- // }
- //
- // /*
- // * @see
- // org.eclipse.core.filebuffers.IFileBufferManager#removeFileBufferListener(org.eclipse.core.filebuffers.IFileBufferListener)
- // */
- // public void removeFileBufferListener(IFileBufferListener listener) {
- // Assert.isNotNull(listener);
- // synchronized (fFileBufferListeners) {
- // fFileBufferListeners.remove(listener);
- // }
- // }
- //
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#setSynchronizationContext(org.eclipse.core.filebuffers.ISynchronizationContext)
- */
- public void setSynchronizationContext(ISynchronizationContext context) {
- fSynchronizationContext = context;
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.1, replaced by {@link
- * org.eclipse.core.filebuffers.IFileBuffer#requestSynchronizationContext()}
- */
- public void requestSynchronizationContext(IPath location) {
- Assert.isNotNull(location);
- location = normalizeLocation(location);
-
- AbstractFileBuffer fileBuffer = internalGetFileBuffer(location);
- if (fileBuffer != null) fileBuffer.requestSynchronizationContext();
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated As of 3.1, replaced by {@link IFileBuffer#releaseSynchronizationContext()}
- */
- public void releaseSynchronizationContext(IPath location) {
- Assert.isNotNull(location);
- location = normalizeLocation(location);
-
- AbstractFileBuffer fileBuffer = internalGetFileBuffer(location);
- if (fileBuffer != null) fileBuffer.releaseSynchronizationContext();
- }
-
- @Override
- public void addFileBufferListener(IFileBufferListener listener) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void removeFileBufferListener(IFileBufferListener listener) {
- throw new UnsupportedOperationException();
- }
-
- /** {@inheritDoc} */
- public void execute(Runnable runnable) {
- if (fSynchronizationContext != null) fSynchronizationContext.run(runnable);
- else runnable.run();
- }
-
- private AbstractFileBuffer createFileBuffer(IPath location, LocationKind locationKind) {
- /*
- * XXX: the following code is commented out for performance
- * reasons and because we do not yet create a special binary
- * file buffer.
- */
- // if (isTextFileLocation(location, false))
- // return createTextFileBuffer(location);
- // return createBinaryFileBuffer(location, locationKind);
- return createTextFileBuffer(location, locationKind);
- }
-
- /**
- * Creates a text file buffer for the given path.
- *
- * @param location the location of the file to be connected
- * @param locationKind the kind of the given location
- * @return the text file buffer
- * @since 3.3
- */
- protected AbstractFileBuffer createTextFileBuffer(IPath location, LocationKind locationKind) {
- // Assert.isLegal(locationKind != LocationKind.IFILE);
- return new FileStoreTextFileBuffer(this);
- }
-
- // private AbstractFileBuffer createBinaryFileBuffer(IPath location, LocationKind locationKind) {
- // // XXX: should return a binary file buffer - using text file buffer for now
- // return createTextFileBuffer(location, locationKind);
- // }
-
- // private FileStoreFileBuffer createFileBuffer(IFileStore location) {
- // /*
- // * XXX: the following code is commented out for performance
- // * reasons and because we do not yet create a special binary
- // * file buffer.
- // */
- //// if (isTextFileLocation(location, false))
- //// return createTextFileBuffer(location);
- //// return createBinaryFileBuffer(location);
- // return createTextFileBuffer(location);
- //
- // }
-
- // /**
- // * Creates a text file buffer for the given file store.
- // *
- // * @param location the file store
- // * @return the text file buffer
- // * @since 3.3
- // */
- // protected FileStoreFileBuffer createTextFileBuffer(IFileStore location) {
- // return new FileStoreTextFileBuffer(this);
- // }
-
- // private FileStoreFileBuffer createBinaryFileBuffer(FileStore location) {
- // // XXX: should return a binary file buffer - using text file buffer for now
- // return createTextFileBuffer(location);
- // }
-
- private Iterator getFileBufferListenerIterator() {
- synchronized (fFileBufferListeners) {
- return new ArrayList(fFileBufferListeners).iterator();
- }
- }
-
- protected void fireDirtyStateChanged(final IFileBuffer buffer, final boolean isDirty) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.dirtyStateChanged(buffer, isDirty);
- }
- });
- }
- }
-
- protected void fireBufferContentAboutToBeReplaced(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.bufferContentAboutToBeReplaced(buffer);
- }
- });
- }
- }
-
- protected void fireBufferContentReplaced(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.bufferContentReplaced(buffer);
- }
- });
- }
- }
-
- protected void fireUnderlyingFileMoved(final IFileBuffer buffer, final IPath target) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.underlyingFileMoved(buffer, target);
- }
- });
- }
- }
-
- protected void fireUnderlyingFileDeleted(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.underlyingFileDeleted(buffer);
- }
- });
- }
- }
-
- protected void fireStateValidationChanged(
- final IFileBuffer buffer, final boolean isStateValidated) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.stateValidationChanged(buffer, isStateValidated);
- }
- });
- }
- }
-
- protected void fireStateChanging(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.stateChanging(buffer);
- }
- });
- }
- }
-
- protected void fireStateChangeFailed(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.stateChangeFailed(buffer);
- }
- });
- }
- }
-
- protected void fireBufferCreated(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.bufferCreated(buffer);
- }
- });
- }
- }
-
- protected void fireBufferDisposed(final IFileBuffer buffer) {
- Iterator e = getFileBufferListenerIterator();
- while (e.hasNext()) {
- final IFileBufferListener l = (IFileBufferListener) e.next();
- SafeRunner.run(
- new SafeNotifier() {
- public void run() {
- l.bufferDisposed(buffer);
- }
- });
- }
- }
-
- /*
- * @see org.eclipse.core.filebuffers.IFileBufferManager#validateState(org.eclipse.core.filebuffers.IFileBuffer[], org.eclipse.core.runtime.IProgressMonitor, java.lang.Object)
- * @since 3.1
- */
- public void validateState(
- final IFileBuffer[] fileBuffers, IProgressMonitor monitor, final Object computationContext)
- throws CoreException {}
-
- /**
- * Returns the line delimiter to be used by the given location.
- *
- * @param location the location of the file to be connected
- * @param locationKind the kind of the given location
- * @return the line delimiter
- * @since 3.3
- */
- protected String getLineDelimiterPreference(IPath location, LocationKind locationKind) {
- return System.getProperty("line.separator"); // $NON-NLS-1$
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/resources/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/resources/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties
deleted file mode 100644
index 817d8c2362a..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filebuffers/src/main/resources/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-###############################################################################
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-ExtensionsRegistry_error_extensionPointNotFound= Extension point "{0}" not found.
-ExtensionsRegistry_error_contentTypeDoesNotExist= The content type with id "{0}" specified in the extension point does not exist.
-
-ResourceFileBuffer_error_cannot_determine_URI= Cannot determine URI for ''{0}''.
-ResourceFileBuffer_warning_fileIsDerived= This file is derived and does not allow to be modified.
-ResourceFileBuffer_stateValidationFailed= State validation failed.
-
-FileBuffer_error_outOfSync= The file is not synchronized with the local file system.
-
-FileBuffer_status_error= Error
-FileBuffer_error_queryContentDescription= Could not query content description for: {0}
-
-FileBufferManager_error_canNotCreateFilebuffer= Cannot create file buffer.
-
-ResourceTextFileBuffer_error_illegal_encoding_message_arg= Character encoding "{0}" is not a legal character encoding.
-ResourceTextFileBuffer_error_unsupported_encoding_message_arg= Character encoding "{0}" is not supported by this platform.
-ResourceTextFileBuffer_error_charset_mapping_failed_message_arg=Some characters cannot be mapped using "{0}" character encoding.\nEither change the encoding or remove the characters which are not supported by the "{0}" character encoding.
-ResourceTextFileBuffer_task_saving= Saving
-
-ResourceFileBuffer_task_creatingFileBuffer=creating file buffer
-
-JavaTextFileBuffer_error_closeStream= Could not close stream.
-
-TextFileBufferManager_error_documentSetupFailed= A document setup participant failed to setup the document.
-TextFileBufferManager_error_documentFactoryFailed= A document factory failed to create the document.
-TextFileBufferManager_warning_documentSetupInstallsDefaultPartitioner= ''{0}'' must not install a default partitioner.\n\tWhen a ''org.eclipse.core.filebuffers.documentSetup'' extension wants to install partitioning on the document, it must use the ''org.eclipse.jface.text.IDocumentExtension3'' API and use a unique partitioning.
-
-DocumentInputStream_error_streamClosed= Stream closed
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml
deleted file mode 100644
index 2e10564c45e..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-org.eclipse.core.filesystem
") of the Core
- * file system plug-in.
- */
- public static final String PI_FILE_SYSTEM = "org.eclipse.core.filesystem"; // $NON-NLS-1$
-
- /**
- * The simple identifier constant (value "filesystems
") of the extension point of the
- * Core file system plug-in where plug-ins declare file system implementations.
- */
- public static final String PT_FILE_SYSTEMS = "filesystems"; // $NON-NLS-1$
-
- /**
- * A constant known to be zero (0), used in operations which take bit flags to indicate that "no
- * bits are set". This value is also used as a default value in cases where a file system
- * attribute cannot be computed.
- *
- * @see IFileInfo#getLength()
- * @see IFileInfo#getLastModified()
- */
- public static final int NONE = 0;
-
- /**
- * Option flag constant (value 1 <<0) indicating a file opened for appending data to the
- * end.
- *
- * @see IFileStore#openOutputStream(int, IProgressMonitor)
- */
- public static final int APPEND = 1 << 0;
-
- /**
- * Option flag constant (value 1 <<1) indicating that existing files may be overwritten.
- *
- * @see IFileStore#copy(IFileStore, int, IProgressMonitor)
- * @see IFileStore#move(IFileStore, int, IProgressMonitor)
- */
- public static final int OVERWRITE = 1 << 1;
-
- /**
- * Option flag constant (value 1 <<2) indicating that an operation acts on a single file or
- * directory, and not its parents or children.
- *
- * @see IFileStore#copy(IFileStore, int, IProgressMonitor)
- * @see IFileStore#mkdir(int, IProgressMonitor)
- */
- public static final int SHALLOW = 1 << 2;
-
- /**
- * Option flag constant (value 1 <<10) indicating that a file's attributes should be
- * updated.
- *
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- */
- public static final int SET_ATTRIBUTES = 1 << 10;
-
- /**
- * Option flag constant (value 1 <<11) indicating that a file's last modified time should be
- * updated.
- *
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- */
- public static final int SET_LAST_MODIFIED = 1 << 11;
-
- /**
- * Option flag constant (value 1 <<12) indicating that a cached representation of a file
- * should be returned.
- *
- * @see IFileStore#toLocalFile(int, IProgressMonitor)
- */
- public static final int CACHE = 1 << 12;
-
- /**
- * Attribute constant (value 1 <<1) indicating that a file is read only.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- */
- public static final int ATTRIBUTE_READ_ONLY = 1 << 1;
-
- /**
- * Attribute constant (value 1 <<21) indicating that a file is marked with immutable flag.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_IMMUTABLE = 1 << 21;
-
- /**
- * Attribute constant (value 1 <<22) indicating that a file's owner has a read permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_OWNER_READ = 1 << 22;
-
- /**
- * Attribute constant (value 1 <<23) indicating that file's owner has a write permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_OWNER_WRITE = 1 << 23;
-
- /**
- * Attribute constant (value 1 <<24) indicating that file's owner has an execute permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_OWNER_EXECUTE = 1 << 24;
-
- /**
- * Attribute constant (value 1 <<25) indicating that users in file's group have a read
- * permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_GROUP_READ = 1 << 25;
-
- /**
- * Attribute constant (value 1 <<26) indicating that users in file's group have a write
- * permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_GROUP_WRITE = 1 << 26;
-
- /**
- * Attribute constant (value 1 <<27) indicating that users in file's group have an execute
- * permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_GROUP_EXECUTE = 1 << 27;
-
- /**
- * Attribute constant (value 1 <<28) indicating that other users have a read permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_OTHER_READ = 1 << 28;
-
- /**
- * Attribute constant (value 1 <<29) indicating that other users have a write permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_OTHER_WRITE = 1 << 29;
-
- /**
- * Attribute constant (value 1 <<30) indicating that other users have an execute permission.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.3
- */
- public static final int ATTRIBUTE_OTHER_EXECUTE = 1 << 30;
-
- /**
- * Attribute constant (value 1 <<2) indicating that a file is a executable.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- */
- public static final int ATTRIBUTE_EXECUTABLE = 1 << 2;
-
- /**
- * Attribute constant (value 1 <<3) indicating that a file is an archive.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- */
- public static final int ATTRIBUTE_ARCHIVE = 1 << 3;
-
- /**
- * Attribute constant (value 1 <<4) indicating that a file is hidden.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- */
- public static final int ATTRIBUTE_HIDDEN = 1 << 4;
-
- /**
- * Attribute constant (value 1 <<5) indicating that a file is a symbolic link.
- *
- * true
for a given {@link IFileInfo} instance, a String
- * value may be associated with the attribute holding the symbolic link target. This link target
- * can be retrieved with {@link IFileInfo#getStringAttribute(int)} with attribute type {@link
- * #ATTRIBUTE_LINK_TARGET}.
- *
- * false
for these. Operations like reading or writing on
- * broken symbolic links throw a "file not found" exception.
- *
- * @see IFileStore#fetchInfo()
- * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
- * @see IFileInfo#getAttribute(int)
- * @see IFileInfo#setAttribute(int, boolean)
- * @since org.eclipse.core.filesystem 1.1
- */
- public static final int ATTRIBUTE_SYMLINK = 1 << 5;
-
- /**
- * Attribute constant (value 1 <<6) for a string attribute indicating the target file name
- * of a symbolic link.
- *
- *
- // *
- // */
- // public static IFileSystem getFileSystem(String scheme) throws CoreException {
- // return InternalFileSystemCore.getInstance().getFileSystem(scheme);
- // }
- //
- // /**
- // * Returns the local file system.
- // *
- // * @return The local file system
- // */
- // public static IFileSystem getLocalFileSystem() {
- // return InternalFileSystemCore.getInstance().getLocalFileSystem();
- // }
- //
- // /**
- // * Returns the null file system. The null file system can be used
- // * to represent a non-existent or unresolved file system. An example
- // * of a null file system is a file system whose location is relative to an undefined
- // * variable, or a system whose scheme is unknown.
- // *
- *
- */
- public static IFileStore getStore(URI uri) throws CoreException {
- // return InternalFileSystemCore.getInstance().getStore(uri);
- // throw new UnsupportedOperationException("getStore");
- String pathname = uri.getSchemeSpecificPart();
- return new LocalFile(new File(WS_PATH + pathname));
- }
-
- /** This class is not intended to be instantiated. */
- private EFS() {
- super();
- }
-
- public static IFileSystem getLocalFileSystem() {
- throw new UnsupportedOperationException("getLocalFileSystem is not supported");
- }
-
- public static void setWsPath(String wsPath) {
- EFS.WS_PATH = wsPath;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileInfo.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileInfo.java
deleted file mode 100644
index 02ba0e8106b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileInfo.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2012 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * true
if this file exists, and false
if the file does not
- * exist or an I/O error was encountered.
- */
- public abstract boolean exists();
-
- /**
- * Checks whether an I/O error was encountered while accessing this file or directory.
- *
- * @return {@link #IO_ERROR} if an I/O error was encountered, or {@link #NONE} otherwise.
- * @since 1.4
- */
- public abstract int getError();
-
- /**
- * Returns the value of the specified attribute for this file. The attribute must be one of the
- * EFS#ATTRIBUTE_*
constants. Returns false
if this file does not exist,
- * could not be accessed, or the provided attribute does not apply to this file system.
- *
- * @param attribute The attribute to retrieve the value for
- * @return the value of the specified attribute for this file.
- * @see IFileSystem#attributes()
- */
- public abstract boolean getAttribute(int attribute);
-
- /**
- * Returns the value of the specified attribute for this file. The attribute must be one of the
- * EFS#ATTRIBUTE_*
constants. Returns null
if this file does not exist,
- * could not be accessed, or the provided attribute does not apply to this file system.
- *
- * @param attribute The kind of attribute to return. Currently only {@link
- * EFS#ATTRIBUTE_LINK_TARGET} is supported.
- * @return the value of the extended String attribute for this file.
- * @see IFileSystem#attributes()
- * @since org.eclipse.core.filesystem 1.1
- */
- public abstract String getStringAttribute(int attribute);
-
- /**
- * Returns the last modified time for this file, or {@link EFS#NONE} if the file does not exist or
- * the last modified time could not be computed.
- *
- * false
if this file does not exist.
- *
- * @return true
if this file is a directory, and false
otherwise.
- */
- public abstract boolean isDirectory();
-
- /**
- * Sets the value of the specified attribute for this file info. The attribute must be one of the
- * EFS#ATTRIBUTE_*
constants. Note that not all attributes are applicable in a given
- * file system.
- *
- * null
if progress reporting and cancellation
- * are not desired
- * @return An array of information about the children of this store, or an empty array if this
- * store has no children.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IFileTree#getChildInfos(IFileStore)
- */
- public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the names of the files and directories contained within this store.
- *
- * @param options bit-wise or of option flag constants (currently only {@link EFS#NONE} is
- * applicable).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @return The names of the children of this store, or an empty array if this store has no
- * children.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public String[] childNames(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns an {@link IFileStore} instance for each file and directory contained within this store.
- *
- * @param options bit-wise or of option flag constants (currently only {@link EFS#NONE} is
- * applicable).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @return The children of this store, or an empty array if this store has no children.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IFileTree#getChildStores(IFileStore)
- */
- public IFileStore[] childStores(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Copies the file represented by this store to the provided destination store. Copying occurs
- * with best-effort semantics; if some files cannot be copied, exceptions are recorded but other
- * files will continue to be copied if possible.
- *
- * OVERWRITE
flag is present, then
- * existing files at the destination are overwritten with the corresponding files from the source
- * of the copy operation. When this flag is not present, existing files at the destination are not
- * overwritten and an exception is thrown indicating what files could not be copied. No exception
- * is thrown for directories that already exist at the destination.
- *
- *
- * CoreException
, regardless of whether the OVERWRITE
flag is specified or
- * not.
- *
- * SHALLOW
flag is present, then a directory will be copied but
- * the files and directories within it will not. When this flag is not present, all child
- * directories and files of a directory are copied recursively.
- *
- * null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public void copy(IFileStore destination, int options, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Deletes the files and directories represented by this store. Deletion of a file that does not
- * exist has no effect.
- *
- * OVERWRITE
flag is not specified and a file of the same name already
- * exists at the copy destination.
- * null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see EFS#ATTRIBUTE_SYMLINK
- */
- public void delete(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Fetches and returns information about this file from the underlying file system. Returns a file
- * info representing a non-existent file if the underlying file system could not be contacted.
- *
- * fetchInfo(EFS.NONE, null)
. This
- * method is intended as a convenience when dealing with fast, highly available file systems such
- * as the local file system. Clients that require progress reporting and error handling, for
- * example when dealing with remote file systems, should use {@link #fetchInfo(int,
- * IProgressMonitor)} instead.
- *
- * @return A structure containing information about this file.
- * @see #fetchInfo(int, IProgressMonitor)
- */
- public IFileInfo fetchInfo();
-
- /**
- * Fetches and returns information about this file from the underlying file system.
- *
- * false
when IFileInfo#exists() is called, but all other
- * information will assume default values.
- *
- * @param options bit-wise or of option flag constants (currently only {@link EFS#NONE} is
- * applicable).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @return A structure containing information about this file.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IFileTree#getFileInfo(IFileStore)
- */
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns a child of this store as specified by the provided path. The path is treated as
- * relative to this store. This is equivalent to
- *
- *
- * IFileStore result = this;
- * for (int i = 0; i < path.segmentCount(); i++) {
- * result = result.getChild(path.segment(i));
- * return result;
- *
- *
- * fetchInfo().getName()
.
- *
- * @return The name of this store
- */
- public String getName();
-
- /**
- * Returns the parent of this store. This is a handle only method; the parent is returned
- * regardless of whether this store or the parent store exists. This method returns null
- *
when this store represents the root directory of a file system.
- *
- * @return The parent store, or null
if this store is the root of a file system.
- */
- public IFileStore getParent();
-
- /**
- * Returns whether this store is a parent of the provided store. This is equivalent to, but
- * typically more efficient than, the following:
- * while (true) {
- * other = other.getParent();
- * if (other == null)
- * return false;
- * if (this.equals(other))
- * return true;
- * }
- *
- *
- * true
if this store is a parent of the provided store, and false
- *
otherwise.
- */
- public boolean isParentOf(IFileStore other);
-
- /**
- * Creates a directory, and optionally its parent directories. If the directory already exists,
- * this method has no effect.
- *
- * SHALLOW
flag is present, this method will
- * fail if the parent directory does not exist. When the flag is not present, all necessary parent
- * directories are also created.
- *
- * @param options bit-wise or of option flag constants ({@link EFS#SHALLOW}).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @return This directory
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Moves the file represented by this store to the provided destination store. Moving occurs with
- * best-effort semantics; if some files cannot be moved, exceptions are recorded but other files
- * will continue to be moved if possible.
- *
- * OVERWRITE
flag is present, then
- * existing files at the destination are overwritten with the corresponding files from the source
- * of the move operation. When this flag is not present, existing files at the destination are not
- * overwritten and an exception is thrown indicating what files could not be moved.
- *
- * @param destination The destination of the move.
- * @param options bit-wise or of option flag constants ({@link EFS#OVERWRITE}).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public void move(IFileStore destination, int options, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns an open input stream on the contents of this file. The number of concurrently open
- * streams depends on the implementation and can be limited. The caller is responsible for closing
- * the provided stream when it is no longer needed.
- *
- * BufferedInputStream
wrapper should be used, or some
- * other form of content buffering.
- *
- * CoreException
may be thrown, when the limit is exceeded.
- *
- * @param options bit-wise or of option flag constants (currently only {@link EFS#NONE} is
- * applicable).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @return An input stream on the contents of this file.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns an open output stream on the contents of this file. The number of concurrently open
- * streams depends on implementation and can be limited. The caller is responsible for closing the
- * provided stream when it is no longer needed. This file need not exist in the underlying file
- * system at the time this method is called.
- *
- * BufferedOutputStream
wrapper should be used, or some
- * other form of content buffering.
- *
- * CoreException
may be thrown, when the limit is exceeded.
- *
- * null
if progress reporting and cancellation
- * are not desired
- * @return An output stream on the contents of this file.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Writes information about this file to the underlying file system. Only certain parts of the
- * file information structure can be written using this method, as specified by the option flags.
- * Other changed information in the provided info will be ignored. This method has no effect when
- * no option flags are provided. The following example sets the last modified time for a file
- * store, leaving other values unchanged:
- *
- *
- * IFileInfo info = EFS#createFileInfo();
- * info.setLastModified(System.currentTimeMillis());
- * store.putInfo(info, EFS.SET_LAST_MODIFIED, monitor);
- *
- *
- * EFS#ATTRIBUTE_*
values, with the
- * exception of EFS#ATTRIBUTE_DIRECTORY
, EFS#ATTRIBUTE_SYMLINK
and
- * EFS#ATTRIBUTE_LINK_TARGET
, are set for this file. When this flag is not specified,
- * changed attributes on the provided file info are ignored.
- *
- * null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see EFS#createFileInfo()
- */
- public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns a file in the local file system with the same state as this file.
- *
- * null
if this store is not a local file.
- *
- * null
if progress reporting and cancellation
- * are not desired
- * @return A local file with the same state as this file or null
if {@link EFS#CACHE}
- * is not specified and this is not a local file.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IFileSystem#fromLocalFile(java.io.File)
- */
- public java.io.File toLocalFile(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns a string representation of this store. The string will be translated if applicable, and
- * suitable for displaying in error messages to an end-user. The actual format of the string is
- * unspecified.
- *
- * @return A string representation of this store.
- */
- public String toString();
-
- /**
- * Returns a URI instance corresponding to this store. The resulting URI, when passed to {@link
- * EFS#getStore(URI)}, will return a store equal to this instance.
- *
- * @return A URI corresponding to this store.
- * @see EFS#getStore(URI)
- */
- public URI toURI();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileSystem.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileSystem.java
deleted file mode 100644
index 44ba04ac840..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/IFileSystem.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2014-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * EFS.ATTRIBUTE_*
constants.
- *
- * @return the file attributes supported by this file system.
- */
- public int attributes();
-
- /**
- * Returns whether this file system supports deletion
- *
- * @return true
if this file system allows deletion of files and directories, and
- * false
otherwise
- */
- public boolean canDelete();
-
- /**
- * Returns whether this file system supports modification.
- *
- * @return true
if this file system allows modification of files and directories, and
- * false
otherwise
- */
- public boolean canWrite();
-
- // /**
- // * Returns a file tree containing information about the complete sub-tree
- // * rooted at the given store. Returns null
if this file
- // * system does not support the creation of such file trees.
- // * null
if progress
- // * reporting and cancellation are not desired
- // * @return an {@link IFileTree} containing the sub-tree of the given store,
- // * or null
- // * @exception CoreException if this method fails. Reasons include:
- // *
- // *
- // * @see IFileTree
- // */
- // public IFileTree fetchFileTree(IFileStore root, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the file store in this file system corresponding to the given local file. Returns
- * null
if this file system cannot provide an {@link IFileStore} corresponding to a
- * local file.
- *
- * @param file The file to be converted
- * @return The {@link IFileStore} corresponding to the given file, or null
- * @see IFileStore#toLocalFile(int, IProgressMonitor)
- */
- public IFileStore fromLocalFile(java.io.File file);
-
- /**
- * Returns the URI scheme of this file system.
- *
- * @return the URI scheme of this file system.
- */
- public String getScheme();
-
- /**
- * Returns a handle to a file store in this file system. This is a handle-only method; this method
- * succeeds regardless of whether a file exists at that path in this file system.
- *
- * true
if this file system is case sensitive, and false
- * otherwise.
- */
- public boolean isCaseSensitive();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/URIUtil.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/URIUtil.java
deleted file mode 100644
index fb02b8e3f08..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/URIUtil.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.eclipse.core.filesystem;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/** @author Evgen Vidolob */
-public class URIUtil {
- /**
- * Returns an {@link IPath} representing this {@link URI} in the local file system, or null
- *
if this URI does not represent a file in the local file system.
- *
- * @param uri The URI to convert
- * @return The path representing the provided URI, null
- */
- public static IPath toPath(URI uri) {
- Assert.isNotNull(uri);
- // Special treatment for LocalFileSystem. For performance only.
- if (EFS.SCHEME_FILE.equals(uri.getScheme())) return new Path(uri.getSchemeSpecificPart());
- // Relative path
- if (uri.getScheme() == null) return new Path(uri.getPath());
- // General case
- try {
- IFileStore store = EFS.getStore(uri);
- if (store == null) return null;
- File file = store.toLocalFile(EFS.NONE, null);
- if (file == null) return null;
- return new Path(file.getAbsolutePath());
- } catch (CoreException e) {
- // Fall through to return null.
- }
- return null;
- }
-
- /**
- * Converts an {@link IPath} representing a local file system path to a {@link URI}.
- *
- * @param path The path to convert
- * @return The URI representing the provided path
- */
- public static URI toURI(IPath path) {
- if (path == null) return null;
- if (path.isAbsolute()) return toURI(path.toFile().getAbsolutePath(), true);
- // Must use the relativize method to properly construct a relative URI
- URI base = toURI(Path.ROOT.setDevice(path.getDevice()));
- return base.relativize(toURI(path.makeAbsolute()));
- }
-
- /**
- * Converts a String representing a local file system path to a {@link URI}. For example, this
- * method can be used to create a URI from the output of {@link File#getAbsolutePath()}.
- *
- * forceAbsolute
flag controls how this method handles relative paths. If the
- * value is true
, then the input path is always treated as an absolute path, and the
- * returned URI will be an absolute URI. If the value is false
, then a relative path
- * provided as input will result in a relative URI being returned.
- *
- * @param pathString The path string to convert
- * @param forceAbsolute if true
the path is treated as an absolute path
- * @return The URI representing the provided path string
- * @since org.eclipse.core.filesystem 1.2
- */
- public static URI toURI(String pathString, boolean forceAbsolute) {
- if (File.separatorChar != '/') pathString = pathString.replace(File.separatorChar, '/');
- final int length = pathString.length();
- StringBuffer pathBuf = new StringBuffer(length + 1);
- // mark if path is relative
- if (length > 0 && (pathString.charAt(0) != '/') && forceAbsolute) {
- pathBuf.append('/');
- }
- // additional double-slash for UNC paths to distinguish from host separator
- if (pathString.startsWith("//")) // $NON-NLS-1$
- pathBuf.append('/').append('/');
- pathBuf.append(pathString);
- try {
- String scheme = null;
- if (length > 0 && (pathBuf.charAt(0) == '/')) {
- scheme = EFS.SCHEME_FILE;
- }
- return new URI(scheme, null, pathBuf.toString(), null);
- } catch (URISyntaxException e) {
- // try java.io implementation
- return new File(pathString).toURI();
- }
- }
-
- /**
- * Converts a String representing a local file system path to a {@link URI}. For example, this
- * method can be used to create a URI from the output of {@link File#getAbsolutePath()}. The
- * provided path string is always treated as an absolute path.
- *
- * @param pathString The absolute path string to convert
- * @return The URI representing the provided path string
- */
- public static URI toURI(String pathString) {
- IPath path = new Path(pathString);
- return toURI(path);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/provider/FileInfo.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/provider/FileInfo.java
deleted file mode 100644
index 0e1414fa56a..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/provider/FileInfo.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2012 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * true
if this is a directory, and false
if this is a
- * file.
- */
- public void setDirectory(boolean value) {
- if (value) set(ATTRIBUTE_DIRECTORY);
- else clear(ATTRIBUTE_DIRECTORY);
- }
-
- /**
- * Sets whether this file or directory exists.
- *
- * @param value true
if this file exists, and false
otherwise.
- */
- public void setExists(boolean value) {
- if (value) set(ATTRIBUTE_EXISTS);
- else clear(ATTRIBUTE_EXISTS);
- }
-
- /**
- * Sets the error code indicating whether an I/O error was encountered when accessing the file.
- *
- * @param errorCode {@link IFileInfo#IO_ERROR} if this file has an I/O error, and {@link
- * IFileInfo#NONE} otherwise.
- * @since 1.4
- */
- public void setError(int errorCode) {
- this.errorCode = errorCode;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileInfo#setLastModified(long)
- */
- public void setLastModified(long value) {
- lastModified = value;
- }
-
- /**
- * Sets the length of this file. A value of {@link EFS#NONE} indicates the file does not exist, is
- * a directory, or the length could not be computed.
- *
- * @param value the length of this file, or {@link EFS#NONE}
- */
- public void setLength(long value) {
- this.length = value;
- }
-
- /**
- * Sets the name of this file.
- *
- * @param name The file name
- */
- public void setName(String name) {
- if (name == null) throw new IllegalArgumentException();
- this.name = name;
- }
-
- /**
- * Sets or clears a String attribute, e.g. symbolic link target.
- *
- * @param attribute The kind of attribute to set. Currently only {@link EFS#ATTRIBUTE_LINK_TARGET}
- * is supported.
- * @param value The String attribute, or null
to clear the attribute
- * @since org.eclipse.core.filesystem 1.1
- */
- public void setStringAttribute(int attribute, String value) {
- if (attribute == EFS.ATTRIBUTE_LINK_TARGET) this.linkTarget = value;
- }
-
- /** For debugging purposes only. */
- public String toString() {
- return name;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/provider/FileStore.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/provider/FileStore.java
deleted file mode 100644
index 5e6754d853c..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/filesystem/provider/FileStore.java
+++ /dev/null
@@ -1,494 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- protected void copyDirectory(
- IFileInfo sourceInfo, IFileStore destination, int options, IProgressMonitor monitor)
- throws CoreException {
- try {
- IFileStore[] children = null;
- int opWork = 1;
- if ((options & EFS.SHALLOW) == 0) {
- children = childStores(EFS.NONE, null);
- opWork += children.length;
- }
- monitor.beginTask("", opWork); // $NON-NLS-1$
- monitor.subTask(NLS.bind(Messages.copying, toString()));
- // create directory
- destination.mkdir(EFS.NONE, Policy.subMonitorFor(monitor, 1));
- // copy attributes
- transferAttributes(sourceInfo, destination);
-
- if (children == null) return;
- // copy children
- for (int i = 0; i < children.length; i++)
- children[i].copy(
- destination.getChild(children[i].getName()), options, Policy.subMonitorFor(monitor, 1));
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Copies a file as specified by {@link IFileStore#copy(IFileStore, int, IProgressMonitor)}.
- *
- * @param sourceInfo The current file information for the source of the move
- * @param destination The destination of the copy.
- * @param options bit-wise or of option flag constants ( {@link EFS#OVERWRITE} or {@link
- * EFS#SHALLOW}).
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- protected void copyFile(
- IFileInfo sourceInfo, IFileStore destination, int options, IProgressMonitor monitor)
- throws CoreException {
- try {
- if ((options & EFS.OVERWRITE) == 0 && destination.fetchInfo().exists())
- Policy.error(EFS.ERROR_EXISTS, NLS.bind(Messages.fileExists, destination));
- long length = sourceInfo.getLength();
- int totalWork;
- if (length == -1) totalWork = IProgressMonitor.UNKNOWN;
- else totalWork = 1 + (int) (length / buffer.length);
- String sourcePath = toString();
- monitor.beginTask(NLS.bind(Messages.copying, sourcePath), totalWork);
- InputStream in = null;
- OutputStream out = null;
- try {
- in = openInputStream(EFS.NONE, Policy.subMonitorFor(monitor, 0));
- out = destination.openOutputStream(EFS.NONE, Policy.subMonitorFor(monitor, 0));
- transferStreams(in, out, sourcePath, monitor);
- transferAttributes(sourceInfo, destination);
- } catch (CoreException e) {
- Policy.safeClose(in);
- Policy.safeClose(out);
- // if we failed to write, try to cleanup the half written file
- if (!destination.fetchInfo(0, null).exists()) destination.delete(EFS.NONE, null);
- throw e;
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * The default implementation of {@link IFileStore#delete(int, IProgressMonitor)}. This
- * implementation always throws an exception indicating that deletion is not supported by this
- * file system. This method should be overridden for all file systems on which deletion is
- * supported.
- *
- * @param options bit-wise or of option flag constants
- * @param monitor a progress monitor, or OVERWRITE
flag is not specified and a file of the same name already
- * exists at the copy destination.
- * null
if progress reporting and cancellation
- * are not desired
- */
- public void delete(int options, IProgressMonitor monitor) throws CoreException {
- Policy.error(EFS.ERROR_DELETE, NLS.bind(Messages.noImplDelete, toString()));
- }
-
- /**
- * This implementation of {@link Object#equals(Object)} defines equality based on the file store's
- * URI. Subclasses should override this method to return true
if and only if the two
- * file stores represent the same resource in the backing file system. Issues to watch out for
- * include whether the file system is case-sensitive, and whether trailing slashes are considered
- * significant. Subclasses that override this method should also override {@link #hashCode()}.
- *
- * @param obj The object to compare with the receiver for equality
- * @return true
if this object is equal to the provided object, and false
- *
otherwise.
- * @since org.eclipse.core.filesystem 1.1
- */
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (!(obj instanceof FileStore)) return false;
- return toURI().equals(((FileStore) obj).toURI());
- }
-
- /**
- * The default implementation of {@link IFileStore#fetchInfo()}. This implementation forwards to
- * {@link IFileStore#fetchInfo(int, IProgressMonitor)}. Subclasses may override this method.
- */
- public IFileInfo fetchInfo() {
- try {
- return fetchInfo(EFS.NONE, null);
- } catch (CoreException e) {
- // there was an error contacting the file system, so treat it as non-existent file
- FileInfo result = new FileInfo(getName());
- result.setExists(false);
- return result;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#fetchInfo(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public abstract IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException;
-
- /**
- * The default implementation of {@link IFileStore#getChild(IPath)}. Subclasses may override.
- *
- * @deprecated
- */
- public IFileStore getChild(IPath path) {
- IFileStore result = this;
- for (int i = 0, imax = path.segmentCount(); i < imax; i++)
- result = result.getChild(path.segment(i));
- return result;
- }
-
- /**
- * The default implementation of {@link IFileStore#getFileStore(IPath)} Subclasses may override.
- *
- * @since org.eclipse.core.filesystem 1.2
- */
- public IFileStore getFileStore(IPath path) {
- IFileStore result = this;
- String segment = null;
- for (int i = 0, imax = path.segmentCount(); i < imax; i++) {
- segment = path.segment(i);
- if (segment.equals(".")) // $NON-NLS-1$
- continue;
- else if (segment.equals("..") && result.getParent() != null) // $NON-NLS-1$
- result = result.getParent();
- else result = result.getChild(segment);
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#getChild(java.lang.String)
- */
- public abstract IFileStore getChild(String name);
-
- // /**
- // * The default implementation of {@link IFileStore#getFileSystem()}.
- // * Subclasses may override.
- // */
- // public IFileSystem getFileSystem() {
- // try {
- // return EFS.getFileSystem(toURI().getScheme());
- // } catch (CoreException e) {
- // //this will only happen if toURI() has been incorrectly implemented
- // throw new RuntimeException(e);
- // }
- // }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#getName()
- */
- public abstract String getName();
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#getParent()
- */
- public abstract IFileStore getParent();
-
- /**
- * This implementation of {@link Object#hashCode()} uses a definition of equality based on
- * equality of the file store's URI. Subclasses that override {@link #equals(Object)} should also
- * override this method to ensure the contract of {@link Object#hashCode()} is honored.
- *
- * @return A hash code value for this file store
- * @since org.eclipse.core.filesystem 1.1
- */
- public int hashCode() {
- return toURI().hashCode();
- }
-
- /**
- * The default implementation of {@link IFileStore#isParentOf(IFileStore)}. This implementation
- * performs parent calculation using other primitive methods. Subclasses may override this method.
- *
- * @param other The store to test for parentage.
- * @return true
if this store is a parent of the provided store, and false
- *
otherwise.
- */
- public boolean isParentOf(IFileStore other) {
- while (true) {
- other = other.getParent();
- if (other == null) return false;
- if (this.equals(other)) return true;
- }
- }
-
- /**
- * The default implementation of {@link IFileStore#mkdir(int, IProgressMonitor)}. This
- * implementation always throws an exception indicating that this file system is read only. This
- * method should be overridden for all writable file systems.
- *
- * @param options bit-wise or of option flag constants
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- */
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
- Policy.error(EFS.ERROR_WRITE, NLS.bind(Messages.noImplWrite, toString()));
- return null; // can't get here
- }
-
- /**
- * The default implementation of {@link IFileStore#move(IFileStore, int, IProgressMonitor)}. This
- * implementation performs a move by using other primitive methods. Subclasses may override this
- * method.
- */
- public void move(IFileStore destination, int options, IProgressMonitor monitor)
- throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(NLS.bind(Messages.moving, destination.toString()), 100);
- copy(destination, options & EFS.OVERWRITE, Policy.subMonitorFor(monitor, 70));
- delete(EFS.NONE, Policy.subMonitorFor(monitor, 30));
- } catch (CoreException e) {
- // throw new error to indicate failure occurred during a move
- String message = NLS.bind(Messages.couldNotMove, toString());
- Policy.error(EFS.ERROR_WRITE, message, e);
- } finally {
- monitor.done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#openInputStream(int, IProgressMonitor)
- */
- public abstract InputStream openInputStream(int options, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * The default implementation of {@link IFileStore#openOutputStream(int, IProgressMonitor)}. This
- * implementation always throws an exception indicating that this file system is read only. This
- * method should be overridden for all writable file systems.
- *
- * null
if progress reporting and cancellation
- * are not desired
- */
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
- Policy.error(EFS.ERROR_WRITE, NLS.bind(Messages.noImplWrite, toString()));
- return null; // can't get here
- }
-
- /**
- * The default implementation of {@link IFileStore#putInfo(IFileInfo, int, IProgressMonitor)}.
- * This implementation always throws an exception indicating that this file system is read only.
- * This method should be overridden for all writable file systems.
- *
- * @param options bit-wise or of option flag constants
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- */
- public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
- Policy.error(EFS.ERROR_WRITE, NLS.bind(Messages.noImplWrite, toString()));
- }
-
- /**
- * The default implementation of {@link IFileStore#toLocalFile(int, IProgressMonitor)}. When the
- * {@link EFS#CACHE} option is specified, this method returns a cached copy of this store in the
- * local file system, or null
if this store does not exist.
- */
- public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException {
- // monitor = Policy.monitorFor(monitor);
- // //caching is the only recognized option
- // if (options != EFS.CACHE)
- // return null;
- // return FileCache.getCache().cache(this, monitor);
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Object getAdapter(Class aClass) {
- throw new UnsupportedOperationException("getAdapter");
- }
-
- /**
- * Default implementation of {@link IFileStore#toString()}. This default implementation returns a
- * string equal to the one returned by #toURI().toString(). Subclasses may override to provide a
- * more specific string representation of this store.
- *
- * @return A string representation of this store.
- */
- public String toString() {
- return toURI().toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#toURI()
- */
- public abstract URI toURI();
-
- private void transferAttributes(IFileInfo sourceInfo, IFileStore destination)
- throws CoreException {
- int options = EFS.SET_ATTRIBUTES | EFS.SET_LAST_MODIFIED;
- destination.putInfo(sourceInfo, options, null);
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/LocalFile.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/LocalFile.java
deleted file mode 100644
index 3aca516d4a8..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/LocalFile.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
- * @throws CoreException A more specific exception if the parent is read-only
- */
- private void checkReadOnlyParent(File target, Throwable exception) throws CoreException {
- File parent = target.getParentFile();
- if (parent != null && (attributes(parent) & EFS.ATTRIBUTE_READ_ONLY) != 0) {
- String message = NLS.bind(Messages.readOnlyParent, target.getAbsolutePath());
- Policy.error(EFS.ERROR_PARENT_READ_ONLY, message, exception);
- }
- }
-
- /**
- * This method is called after a failure to modify a directory. Check to see if the target is not
- * writable (e.g. device doesn't not exist) and if so then throw an exception with a more specific
- * message and error code.
- *
- * @param target The directory that we failed to modify
- * @param exception The low level exception that occurred, or null
- * @throws CoreException A more specific exception if the target is not writable
- */
- private void checkTargetIsNotWritable(File target, Throwable exception) throws CoreException {
- if (!target.canWrite()) {
- String message = NLS.bind(Messages.couldNotWrite, target.getAbsolutePath());
- Policy.error(EFS.ERROR_WRITE, message);
- }
- }
-
- public String[] childNames(int options, IProgressMonitor monitor) {
- String[] names = file.list();
- return (names == null ? EMPTY_STRING_ARRAY : names);
- }
-
- public void copy(IFileStore destFile, int options, IProgressMonitor monitor)
- throws CoreException {
- if (destFile instanceof LocalFile) {
- File source = file;
- File destination = ((LocalFile) destFile).file;
- // handle case variants on a case-insensitive OS, or copying between
- // two equivalent files in an environment that supports symbolic links.
- // in these nothing needs to be copied (and doing so would likely lose data)
- try {
- if (source.getCanonicalFile().equals(destination.getCanonicalFile())) {
- // nothing to do
- return;
- }
- } catch (IOException e) {
- String message = NLS.bind(Messages.couldNotRead, source.getAbsolutePath());
- Policy.error(EFS.ERROR_READ, message, e);
- }
- }
- // fall through to super implementation
- super.copy(destFile, options, monitor);
- }
-
- public void delete(int options, IProgressMonitor monitor) throws CoreException {
- if (monitor == null) monitor = new NullProgressMonitor();
- // else
- // monitor = new InfiniteProgress(monitor);
- try {
- monitor.beginTask(NLS.bind(Messages.deleting, this), 200);
- String message = Messages.deleteProblem;
- MultiStatus result = new MultiStatus(Policy.PI_FILE_SYSTEM, EFS.ERROR_DELETE, message, null);
- internalDelete(file, filePath, result, monitor);
- if (!result.isOK()) throw new CoreException(result);
- } finally {
- monitor.done();
- }
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof LocalFile)) return false;
- // Mac oddity: file.equals returns false when case is different even when
- // file system is not case sensitive (Radar bug 3190672)
- LocalFile otherFile = (LocalFile) obj;
- // if (LocalFileSystem.MACOSX)
- // return filePath.toLowerCase().equals(otherFile.filePath.toLowerCase());
- return file.equals(otherFile.file);
- }
-
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) {
- // if (LocalFileNativesManager.isUsingNatives()) {
- // FileInfo info = LocalFileNativesManager.fetchFileInfo(filePath);
- // //natives don't set the file name on all platforms
- // if (info.getName().length() == 0) {
- // String name = file.getName();
- // //Bug 294429: make sure that substring baggage is removed
- // info.setName(new String(name.toCharArray()));
- // }
- // return info;
- // }
- // in-lined non-native implementation
- FileInfo info = new FileInfo(file.getName());
- final long lastModified = file.lastModified();
- if (lastModified <= 0) {
- // if the file doesn't exist, all other attributes should be default values
- info.setExists(false);
- return info;
- }
- info.setLastModified(lastModified);
- info.setExists(true);
- info.setLength(file.length());
- info.setDirectory(file.isDirectory());
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, file.exists() && !file.canWrite());
- info.setAttribute(EFS.ATTRIBUTE_HIDDEN, file.isHidden());
- return info;
- }
-
- public IFileStore getChild(IPath path) {
- return new LocalFile(new File(file, path.toOSString()));
- }
-
- public IFileStore getFileStore(IPath path) {
- return new LocalFile(new Path(file.getPath()).append(path).toFile());
- }
-
- public IFileStore getChild(String name) {
- return new LocalFile(new File(file, name));
- }
-
- // /*
- // * (non-Javadoc)
- // * @see org.eclipse.core.filesystem.IFileStore#getFileSystem()
- // */
- // public IFileSystem getFileSystem() {
- // return LocalFileSystem.getInstance();
- // }
-
- public String getName() {
- return file.getName();
- }
-
- public IFileStore getParent() {
- File parent = file.getParentFile();
- return parent == null ? null : new LocalFile(parent);
- }
-
- public int hashCode() {
- // if (LocalFileSystem.MACOSX)
- // return filePath.toLowerCase().hashCode();
- return file.hashCode();
- }
-
- /**
- * Deletes the given file recursively, adding failure info to the provided status object. The
- * filePath is passed as a parameter to optimize java.io.File object creation.
- */
- private boolean internalDelete(
- File target, String pathToDelete, MultiStatus status, IProgressMonitor monitor) {
- // first try to delete - this should succeed for files and symbolic links to directories
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- if (target.delete() || !target.exists()) return true;
- if (target.isDirectory()) {
- monitor.subTask(NLS.bind(Messages.deleting, target));
- String[] list = target.list();
- if (list == null) list = EMPTY_STRING_ARRAY;
- int parentLength = pathToDelete.length();
- boolean failedRecursive = false;
- for (int i = 0, imax = list.length; i < imax; i++) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- // optimized creation of child path object
- StringBuffer childBuffer = new StringBuffer(parentLength + list[i].length() + 1);
- childBuffer.append(pathToDelete);
- childBuffer.append(File.separatorChar);
- childBuffer.append(list[i]);
- String childName = childBuffer.toString();
- // try best effort on all children so put logical OR at end
- failedRecursive =
- !internalDelete(new File(childName), childName, status, monitor) || failedRecursive;
- monitor.worked(1);
- }
- try {
- // don't try to delete the root if one of the children failed
- if (!failedRecursive && target.delete()) return true;
- } catch (Exception e) {
- // we caught a runtime exception so log it
- String message = NLS.bind(Messages.couldnotDelete, target.getAbsolutePath());
- status.add(new Status(IStatus.ERROR, Policy.PI_FILE_SYSTEM, EFS.ERROR_DELETE, message, e));
- return false;
- }
- }
- // if we got this far, we failed
- String message = null;
- if (fetchInfo().getAttribute(EFS.ATTRIBUTE_READ_ONLY))
- message = NLS.bind(Messages.couldnotDeleteReadOnly, target.getAbsolutePath());
- else message = NLS.bind(Messages.couldnotDelete, target.getAbsolutePath());
- status.add(new Status(IStatus.ERROR, Policy.PI_FILE_SYSTEM, EFS.ERROR_DELETE, message, null));
- return false;
- }
-
- public boolean isParentOf(IFileStore other) {
- if (!(other instanceof LocalFile)) return false;
- String thisPath = filePath;
- String thatPath = ((LocalFile) other).filePath;
- int thisLength = thisPath.length();
- int thatLength = thatPath.length();
- // if equal then not a parent
- if (thisLength >= thatLength) return false;
- // if (getFileSystem().isCaseSensitive()) {
- if (thatPath.indexOf(thisPath) != 0) return false;
- // } else {
- // if (thatPath.toLowerCase().indexOf(thisPath.toLowerCase()) != 0)
- // return false;
- // }
- // The common portion must end with a separator character for this to be a parent of that
- return thisPath.charAt(thisLength - 1) == File.separatorChar
- || thatPath.charAt(thisLength) == File.separatorChar;
- }
-
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
- boolean shallow = (options & EFS.SHALLOW) != 0;
- // must be a directory
- if (shallow) file.mkdir();
- else file.mkdirs();
- if (!file.isDirectory()) {
- checkReadOnlyParent(file, null);
- checkTargetIsNotWritable(file, null);
- String message = NLS.bind(Messages.failedCreateWrongType, filePath);
- Policy.error(EFS.ERROR_WRONG_TYPE, message);
- }
- return this;
- }
-
- public void move(IFileStore destFile, int options, IProgressMonitor monitor)
- throws CoreException {
- if (!(destFile instanceof LocalFile)) {
- super.move(destFile, options, monitor);
- return;
- }
- File source = file;
- File destination = ((LocalFile) destFile).file;
- boolean overwrite = (options & EFS.OVERWRITE) != 0;
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(NLS.bind(Messages.moving, source.getAbsolutePath()), 10);
- // this flag captures case renaming on a case-insensitive OS, or moving
- // two equivalent files in an environment that supports symbolic links.
- // in these cases we NEVER want to delete anything
- boolean sourceEqualsDest = false;
- try {
- sourceEqualsDest = source.getCanonicalFile().equals(destination.getCanonicalFile());
- } catch (IOException e) {
- String message = NLS.bind(Messages.couldNotMove, source.getAbsolutePath());
- Policy.error(EFS.ERROR_WRITE, message, e);
- }
- if (!sourceEqualsDest && !overwrite && destination.exists()) {
- String message = NLS.bind(Messages.fileExists, destination.getAbsolutePath());
- Policy.error(EFS.ERROR_EXISTS, message);
- }
- if (source.renameTo(destination)) {
- // double-check to ensure we really did move
- // since java.io.File#renameTo sometimes lies
- if (!sourceEqualsDest && source.exists()) {
- // XXX: document when this occurs
- if (destination.exists()) {
- // couldn't delete the source so remove the destination and throw an error
- // XXX: if we fail deleting the destination, the destination (root) may still exist
- new LocalFile(destination).delete(EFS.NONE, null);
- String message = NLS.bind(Messages.couldnotDelete, source.getAbsolutePath());
- Policy.error(EFS.ERROR_DELETE, message);
- }
- // source exists but destination doesn't so try to copy below
- } else {
- // destination.exists() returns false for broken links, this has to be handled explicitly
- if (!destination.exists() && !destFile.fetchInfo().getAttribute(EFS.ATTRIBUTE_SYMLINK)) {
- // neither the source nor the destination exist. this is REALLY bad
- String message =
- NLS.bind(
- Messages.failedMove, source.getAbsolutePath(), destination.getAbsolutePath());
- Policy.error(EFS.ERROR_WRITE, message);
- }
- // the move was successful
- monitor.worked(10);
- return;
- }
- }
- // for some reason renameTo didn't work
- if (sourceEqualsDest) {
- String message = NLS.bind(Messages.couldNotMove, source.getAbsolutePath());
- Policy.error(EFS.ERROR_WRITE, message, null);
- }
- // fall back to default implementation
- super.move(destFile, options, Policy.subMonitorFor(monitor, 10));
- } finally {
- monitor.done();
- }
- }
-
- public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask("", 1); // $NON-NLS-1$
- return new FileInputStream(file);
- } catch (FileNotFoundException e) {
- String message;
- if (!file.exists()) message = NLS.bind(Messages.fileNotFound, filePath);
- else if (file.isDirectory()) message = NLS.bind(Messages.notAFile, filePath);
- else message = NLS.bind(Messages.couldNotRead, filePath);
- Policy.error(EFS.ERROR_READ, message, e);
- return null;
- } finally {
- monitor.done();
- }
- }
-
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask("", 1); // $NON-NLS-1$
- return new FileOutputStream(file, (options & EFS.APPEND) != 0);
- } catch (FileNotFoundException e) {
- checkReadOnlyParent(file, e);
- String message;
- String path = filePath;
- if (file.isDirectory()) message = NLS.bind(Messages.notAFile, path);
- else message = NLS.bind(Messages.couldNotWrite, path);
- Policy.error(EFS.ERROR_WRITE, message, e);
- return null;
- } finally {
- monitor.done();
- }
- }
-
- public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
- boolean success = true;
- if ((options & EFS.SET_ATTRIBUTES) != 0) {
- // if (LocalFileNativesManager.isUsingNatives())
- // success &= LocalFileNativesManager.putFileInfo(filePath, info, options);
- }
- // native does not currently set last modified
- if ((options & EFS.SET_LAST_MODIFIED) != 0)
- success &= file.setLastModified(info.getLastModified());
- if (!success && !file.exists())
- Policy.error(EFS.ERROR_NOT_EXISTS, NLS.bind(Messages.fileNotFound, filePath));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#toLocalFile(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException {
- // if (options == EFS.CACHE)
- // return super.toLocalFile(options, monitor);
- return file;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#toString()
- */
- public String toString() {
- return file.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.IFileStore#toURI()
- */
- public URI toURI() {
- if (this.uri == null) {
- this.uri = URIUtil.toURI(filePath);
- }
- return this.uri;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/Messages.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/Messages.java
deleted file mode 100644
index dcf1a3b4ccb..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-filesystem/src/main/java/org/eclipse/core/internal/filesystem/Messages.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2005,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- // *
- // * @param file the file for which line separator should be returned
- // * @return line separator for the given file
- // */
- // public static String getLineSeparator(IFile file) {
- // if (file.exists()) {
- // InputStream input = null;
- // try {
- // input = file.getContents();
- // int c = input.read();
- // while (c != -1 && c != '\r' && c != '\n')
- // c = input.read();
- // if (c == '\n')
- // return "\n"; //$NON-NLS-1$
- // if (c == '\r') {
- // if (input.read() == '\n')
- // return "\r\n"; //$NON-NLS-1$
- // return "\r"; //$NON-NLS-1$
- // }
- // } catch (CoreException e) {
- // // ignore
- // } catch (IOException e) {
- // // ignore
- // } finally {
- // safeClose(input);
- // }
- // }
- // Preferences rootNode = Platform.getPreferencesService().getRootNode();
- // String value = null;
- // // if the file does not exist or has no content yet, try with project preferences
- // value =
- // getLineSeparatorFromPreferences(rootNode.node(ProjectScope.SCOPE).node(file.getProject().getName()));
- // if (value != null)
- // return value;
- // // try with instance preferences
- // value = getLineSeparatorFromPreferences(rootNode.node(InstanceScope.SCOPE));
- // if (value != null)
- // return value;
- // // try with default preferences
- // value = getLineSeparatorFromPreferences(rootNode.node(DefaultScope.SCOPE));
- // if (value != null)
- // return value;
- // // if there is no preference set, fall back to OS default value
- // return System.getProperty("line.separator"); //$NON-NLS-1$
- // }
- //
- // /**
- // * Returns true if the given file system locations overlap, and false otherwise.
- // * Overlap means the locations are the same, or one is a proper prefix of the other.
- // */
- // public static boolean isOverlapping(URI location1, URI location2) {
- // return computeOverlap(location1, location2, true);
- // }
- //
- // /**
- // * Returns true if location1 is the same as, or a proper prefix of, location2.
- // * Returns false otherwise.
- // */
- // public static boolean isPrefixOf(IPath location1, IPath location2) {
- // return computeOverlap(location1, location2, false);
- // }
- //
- // /**
- // * Returns true if location1 is the same as, or a proper prefix of, location2.
- // * Returns false otherwise.
- // */
- // public static boolean isPrefixOf(URI location1, URI location2) {
- // return computeOverlap(location1, location2, false);
- // }
-
- /**
- * Closes a stream and ignores any resulting exception. This is useful when doing stream cleanup
- * in a finally block where secondary exceptions are not worth logging.
- *
- * true
if the checkIn failed, and false
otherwise.
- */
- public boolean checkInFailed(ISchedulingRule rule) {
- if (checkInFailed.get() != null) {
- // clear the failure flag for this thread
- checkInFailed.set(null);
- // must still end the rule even in the case of failure
- if (!workspace.isTreeLocked()) jobManager.endRule(rule);
- return true;
- }
- return false;
- }
-
- /** Inform that an operation has finished. */
- public synchronized void checkOut(ISchedulingRule rule) {
- decrementPreparedOperations();
- rebalanceNestedOperations();
- // reset state if this is the end of a top level operation
- if (preparedOperations == 0) hasBuildChanges = false;
- // don't let cancelation of this operation affect other operations
- operationCanceled = false;
- try {
- lock.release();
- } finally {
- // end rule in finally in case lock.release throws an exception
- jobManager.endRule(rule);
- }
- }
-
- /**
- * This method can only be safely called from inside a workspace operation. Should NOT be called
- * from outside a prepareOperation/endOperation block.
- */
- private void decrementPreparedOperations() {
- preparedOperations--;
- }
-
- /**
- * Re-acquires the workspace lock that was temporarily released during an operation, and restores
- * the old lock depth.
- *
- * @see #beginUnprotected()
- */
- public void endUnprotected(int depth) {
- for (int i = 0; i < depth; i++) lock.acquire();
- }
-
- /** Returns the work manager's lock */
- ILock getLock() {
- return lock;
- }
-
- /** Returns the scheduling rule used during resource change notifications. */
- public ISchedulingRule getNotifyRule() {
- return notifyRule;
- }
-
- /**
- * This method can only be safely called from inside a workspace operation. Should NOT be called
- * from outside a prepareOperation/endOperation block.
- */
- public synchronized int getPreparedOperationDepth() {
- return preparedOperations;
- }
-
- /**
- * This method can only be safely called from inside a workspace operation. Should NOT be called
- * from outside a prepareOperation/endOperation block.
- */
- void incrementNestedOperations() {
- nestedOperations++;
- }
-
- /**
- * This method can only be safely called from inside a workspace operation. Should NOT be called
- * from outside a prepareOperation/endOperation block.
- */
- private void incrementPreparedOperations() {
- preparedOperations++;
- }
-
- /**
- * Returns true if the nested operation depth is the same as the prepared operation depth, and
- * false otherwise. This method can only be safely called from inside a workspace operation.
- * Should NOT be called from outside a prepareOperation/endOperation block.
- */
- boolean isBalanced() {
- return nestedOperations == preparedOperations;
- }
-
- /**
- * Returns true if the workspace lock has already been acquired by this thread, and false
- * otherwise.
- */
- public boolean isLockAlreadyAcquired() {
- boolean result = false;
- try {
- boolean success = lock.acquire(0L);
- if (success) {
- // if lock depth is greater than one, then we already owned it
- // before
- result = lock.getDepth() > 1;
- lock.release();
- }
- } catch (InterruptedException e) {
- // ignore
- }
- return result;
- }
-
- /**
- * This method can only be safely called from inside a workspace operation. Should NOT be called
- * from outside a prepareOperation/endOperation block.
- */
- public void operationCanceled() {
- operationCanceled = true;
- }
-
- /**
- * Used to make things stable again after an operation has failed between a
- * workspace.prepareOperation() and workspace.beginOperation(). This method can only be safely
- * called from inside a workspace operation. Should NOT be called from outside a
- * prepareOperation/endOperation block.
- */
- public void rebalanceNestedOperations() {
- nestedOperations = preparedOperations;
- }
-
- /** Indicates if the operation that has just completed may potentially require a build. */
- public void setBuild(boolean hasChanges) {
- hasBuildChanges = hasBuildChanges || hasChanges;
- }
-
- /**
- * This method can only be safely called from inside a workspace operation. Should NOT be called
- * from outside a prepareOperation/endOperation block.
- */
- public boolean shouldBuild() {
- if (hasBuildChanges) {
- if (operationCanceled) return Policy.buildOnCancel;
- return true;
- }
- return false;
- }
-
- public void shutdown(IProgressMonitor monitor) {
- // do nothing
- }
-
- public void startup(IProgressMonitor monitor) {
- jobManager.beginRule(workspace.getRoot(), monitor);
- lock.acquire();
- }
-
- /**
- * This method should be called at the end of the workspace startup, even if the startup failed.
- * It must be preceded by a call to startup
. It releases the primary workspace lock
- * and ends applying the workspace rule to this thread.
- */
- void postWorkspaceStartup() {
- try {
- lock.release();
- } finally {
- // end rule in finally in case lock.release throws an exception
- jobManager.endRule(workspace.getRoot());
- }
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Workspace.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Workspace.java
deleted file mode 100644
index 64e8eb14b20..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/Workspace.java
+++ /dev/null
@@ -1,965 +0,0 @@
-/*
- * Copyright (c) 2012-2018 Red Hat, Inc.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- */
-package org.eclipse.che.core.internal.resources;
-
-import static org.eclipse.che.api.fs.server.WsPathUtils.ROOT;
-import static org.eclipse.che.api.fs.server.WsPathUtils.absolutize;
-import static org.eclipse.che.api.fs.server.WsPathUtils.resolve;
-
-import com.google.inject.Provider;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.che.api.core.BadRequestException;
-import org.eclipse.che.api.core.ConflictException;
-import org.eclipse.che.api.core.ForbiddenException;
-import org.eclipse.che.api.core.NotFoundException;
-import org.eclipse.che.api.core.ServerException;
-import org.eclipse.che.api.fs.server.FsManager;
-import org.eclipse.che.api.fs.server.PathTransformer;
-import org.eclipse.che.api.project.server.ProjectManager;
-import org.eclipse.che.api.project.server.type.BaseProjectType;
-import org.eclipse.che.api.workspace.server.model.impl.ProjectConfigImpl;
-import org.eclipse.che.core.internal.utils.Policy;
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.commands.operations.UndoContext;
-import org.eclipse.core.internal.resources.ICoreConstants;
-import org.eclipse.core.internal.resources.OS;
-import org.eclipse.core.internal.resources.ResourceException;
-import org.eclipse.core.internal.resources.WorkspaceDescription;
-import org.eclipse.core.internal.utils.Messages;
-import org.eclipse.core.resources.IBuildConfiguration;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFilterMatcherDescriptor;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IPathVariableManager;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IProjectNatureDescriptor;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceRuleFactory;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.resources.ISavedState;
-import org.eclipse.core.resources.ISynchronizer;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceDescription;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.team.TeamHook;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.osgi.util.NLS;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/** @author Evgen Vidolob */
-public class Workspace implements IWorkspace {
-
- public static final boolean caseSensitive =
- new java.io.File("a").compareTo(new java.io.File("A")) != 0;
- // $NON-NLS-1$ //$NON-NLS-2$
- private static final Logger LOG = LoggerFactory.getLogger(Workspace.class);
- protected final IWorkspaceRoot defaultRoot = new WorkspaceRoot(Path.ROOT, this);
- private final ProviderlastSegmentOnly
- *
is true, it is assumed that all segments except the last one have previously been
- * validated. This is an optimization for validating a leaf resource when it is known that the
- * parent exists (and thus its parent path must already be valid).
- */
- public IStatus validatePath(IPath path, int type, boolean lastSegmentOnly) {
- String message;
-
- /* path must not be null */
- if (path == null) {
- message = Messages.resources_pathNull;
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
-
- /* path must not have a device separator */
- if (path.getDevice() != null) {
- message =
- NLS.bind(
- Messages.resources_invalidCharInPath, String.valueOf(IPath.DEVICE_SEPARATOR), path);
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
-
- /* path must not be the root path */
- if (path.isRoot()) {
- message = Messages.resources_invalidRoot;
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
-
- /* path must be absolute */
- if (!path.isAbsolute()) {
- message = NLS.bind(Messages.resources_mustBeAbsolute, path);
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
-
- /* validate segments */
- int numberOfSegments = path.segmentCount();
- if ((type & IResource.PROJECT) != 0) {
- if (numberOfSegments == ICoreConstants.PROJECT_SEGMENT_LENGTH) {
- return validateName(path.segment(0), IResource.PROJECT);
- } else if (type == IResource.PROJECT) {
- message = NLS.bind(Messages.resources_projectPath, path);
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
- }
- if ((type & (IResource.FILE | IResource.FOLDER)) != 0) {
- if (numberOfSegments < ICoreConstants.MINIMUM_FILE_SEGMENT_LENGTH) {
- message = NLS.bind(Messages.resources_resourcePath, path);
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
- int fileFolderType = type &= ~IResource.PROJECT;
- int segmentCount = path.segmentCount();
- if (lastSegmentOnly) {
- return validateName(path.segment(segmentCount - 1), fileFolderType);
- }
- IStatus status = validateName(path.segment(0), IResource.PROJECT);
- if (!status.isOK()) {
- return status;
- }
- // ignore first segment (the project)
- for (int i = 1; i < segmentCount; i++) {
- status = validateName(path.segment(i), fileFolderType);
- if (!status.isOK()) {
- return status;
- }
- }
- return Status.OK_STATUS;
- }
- message = NLS.bind(Messages.resources_invalidPath, path);
- return new org.eclipse.core.internal.resources.ResourceStatus(
- IResourceStatus.INVALID_VALUE, null, message);
- }
-
- @Override
- public IStatus validateProjectLocation(IProject iProject, IPath iPath) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public IStatus validateProjectLocationURI(IProject iProject, URI uri) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public IPathVariableManager getPathVariableManager() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Object getAdapter(Class aClass) {
- if (aClass == IUndoContext.class) {
- return undoContext;
- }
- throw new UnsupportedOperationException();
- }
-
- public java.io.File getFile(IPath path) {
- return new java.io.File(wsPath, path.toOSString());
- }
-
- public ResourceInfo getResourceInfo(IPath path) {
- String wsPath = absolutize(path.toOSString());
- return fsManagerProvider.get().exists(wsPath) ? newElement(getType(wsPath)) : null;
- }
-
- private int getType(String wsPath) {
- if (fsManagerProvider.get().existsAsFile(wsPath)) {
- return IResource.FILE;
- } else {
- if (projectManager.get().isRegistered(wsPath)) {
- return IResource.PROJECT;
- } else {
- return IResource.FOLDER;
- }
- }
- }
-
- /** Create and return a new tree element of the given type. */
- protected ResourceInfo newElement(int type) {
- ResourceInfo result = null;
- switch (type) {
- case IResource.FILE:
- case IResource.FOLDER:
- result = new ResourceInfo(type);
- break;
- case IResource.PROJECT:
- result = new ResourceInfo(type);
- break;
- case IResource.ROOT:
- result = new ResourceInfo(type);
- break;
- }
-
- return result;
- }
-
- public IResource[] getChildren(IPath path) {
-
- String parentWsPath = absolutize(path.toOSString());
- if (fsManagerProvider.get().existsAsDir(parentWsPath)) {
- Listnull
.
- */
- ProposedResourceDelta getChild(String name) {
- return children.get(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getFlags()
- */
- public int getFlags() {
- return status & ~KIND_MASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getFullPath()
- */
- public IPath getFullPath() {
- return getResource().getFullPath();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getKind()
- */
- public int getKind() {
- return status & KIND_MASK;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getMarkerDeltas()
- */
- public IMarkerDelta[] getMarkerDeltas() {
- return new IMarkerDelta[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getMovedFromPath()
- */
- public IPath getMovedFromPath() {
- return movedFromPath;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getMovedToPath()
- */
- public IPath getMovedToPath() {
- return movedToPath;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getProjectRelativePath()
- */
- public IPath getProjectRelativePath() {
- return getResource().getProjectRelativePath();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDelta#getResource()
- */
- public IResource getResource() {
- return resource;
- }
-
- public void setFlags(int flags) {
- status = getKind() | (flags & ~KIND_MASK);
- }
-
- protected void setKind(int kind) {
- status = getFlags() | (kind & KIND_MASK);
- }
-
- protected void setMovedFromPath(IPath path) {
- movedFromPath = path;
- }
-
- protected void setMovedToPath(IPath path) {
- movedToPath = path;
- }
-
- /** For debugging purposes only. */
- @Override
- public String toString() {
- return "ProposedDelta(" + resource + ')'; // $NON-NLS-1$
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/mapping/ResourceChangeDescriptionFactory.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/mapping/ResourceChangeDescriptionFactory.java
deleted file mode 100644
index eb4a2e277a5..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/mapping/ResourceChangeDescriptionFactory.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 2012-2018 Red Hat, Inc.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- */
-package org.eclipse.che.core.internal.resources.mapping;
-
-import org.eclipse.che.core.internal.resources.Workspace;
-import org.eclipse.che.core.internal.utils.Policy;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-
-/** Factory for creating a resource delta that describes a proposed change. */
-public class ResourceChangeDescriptionFactory implements IResourceChangeDescriptionFactory {
-
- private ProposedResourceDelta root =
- new ProposedResourceDelta(ResourcesPlugin.getWorkspace().getRoot());
-
- /**
- * Creates and a delta representing a deleted resource, and adds it to the provided parent delta.
- *
- * @param parentDelta The parent of the deletion delta to create
- * @param resource The deleted resource to create a delta for
- */
- private ProposedResourceDelta buildDeleteDelta(
- ProposedResourceDelta parentDelta, IResource resource) {
- // start with the existing delta for this resource, if any, to preserve other flags
- ProposedResourceDelta delta = parentDelta.getChild(resource.getName());
- if (delta == null) {
- delta = new ProposedResourceDelta(resource);
- parentDelta.add(delta);
- }
- delta.setKind(IResourceDelta.REMOVED);
- if (resource.getType() == IResource.FILE) return delta;
- // recurse to build deletion deltas for children
- try {
- IResource[] members = ((IContainer) resource).members();
- int childCount = members.length;
- if (childCount > 0) {
- ProposedResourceDelta[] childDeltas = new ProposedResourceDelta[childCount];
- for (int i = 0; i < childCount; i++) childDeltas[i] = buildDeleteDelta(delta, members[i]);
- }
- } catch (CoreException e) {
- // don't need to create deletion deltas for children of inaccessible resources
- }
- return delta;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IProposedResourceDeltaFactory#change(org.eclipse.core.resources.IFile)
- */
- public void change(IFile file) {
- ProposedResourceDelta delta = getDelta(file);
- if (delta.getKind() == 0) delta.setKind(IResourceDelta.CHANGED);
- // the CONTENT flag only applies to the changed and moved from cases
- if (delta.getKind() == IResourceDelta.CHANGED
- || (delta.getFlags() & IResourceDelta.MOVED_FROM) != 0
- || (delta.getFlags() & IResourceDelta.COPIED_FROM) != 0)
- delta.addFlags(IResourceDelta.CONTENT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IProposedResourceDeltaFactory#close(org.eclipse.core.resources.IProject)
- */
- public void close(IProject project) {
- delete(project);
- ProposedResourceDelta delta = getDelta(project);
- delta.addFlags(IResourceDelta.OPEN);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IProposedResourceDeltaFactory#copy(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IPath)
- */
- public void copy(IResource resource, IPath destination) {
- moveOrCopyDeep(resource, destination, false /* copy */);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IResourceChangeDescriptionFactory#create(org.eclipse.core.resources.IResource)
- */
- public void create(IResource resource) {
- getDelta(resource).setKind(IResourceDelta.ADDED);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IProposedResourceDeltaFactory#delete(org.eclipse.core.resources.IResource)
- */
- public void delete(IResource resource) {
- if (resource.getType() == IResource.ROOT) {
- // the root itself cannot be deleted, so create deletions for each project
- IProject[] projects = ((IWorkspaceRoot) resource).getProjects(IContainer.INCLUDE_HIDDEN);
- for (int i = 0; i < projects.length; i++) buildDeleteDelta(root, projects[i]);
- } else {
- buildDeleteDelta(getDelta(resource.getParent()), resource);
- }
- }
-
- private void fail(CoreException e) {
- Policy.log(
- e.getStatus().getSeverity(),
- "An internal error occurred while accumulating a change description.",
- e); // $NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IProposedResourceDeltaFactory#getDelta()
- */
- public IResourceDelta getDelta() {
- return root;
- }
-
- private ProposedResourceDelta getDelta(IResource resource) {
- ProposedResourceDelta delta = (ProposedResourceDelta) root.findMember(resource.getFullPath());
- if (delta != null) {
- return delta;
- }
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
- IResource iResource = resource.getParent();
- if (iResource == null) {
- iResource =
- ((Workspace) workspace)
- .newResource(resource.getFullPath().removeLastSegments(1), IResource.FOLDER);
- }
- ProposedResourceDelta parent = getDelta(iResource);
- delta = new ProposedResourceDelta(resource);
- parent.add(delta);
- return delta;
- }
-
- /*
- * Return the resource at the destination path that corresponds to the source resource
- * @param source the source resource
- * @param sourcePrefix the path of the root of the move or copy
- * @param destinationPrefix the path of the destination the root was copied to
- * @return the destination resource
- */
- protected IResource getDestinationResource(
- IResource source, IPath sourcePrefix, IPath destinationPrefix) {
- IPath relativePath = source.getFullPath().removeFirstSegments(sourcePrefix.segmentCount());
- IPath destinationPath = destinationPrefix.append(relativePath);
- IResource destination;
- IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
- switch (source.getType()) {
- case IResource.FILE:
- destination = wsRoot.getFile(destinationPath);
- break;
- case IResource.FOLDER:
- destination = wsRoot.getFolder(destinationPath);
- break;
- case IResource.PROJECT:
- destination = wsRoot.getProject(destinationPath.segment(0));
- break;
- default:
- // Shouldn't happen
- destination = null;
- }
- return destination;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.IProposedResourceDeltaFactory#move(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IPath)
- */
- public void move(IResource resource, IPath destination) {
- moveOrCopyDeep(resource, destination, true /* move */);
- }
-
- /**
- * Builds the delta representing a single resource being moved or copied.
- *
- * @param resource The resource being moved
- * @param sourcePrefix The root of the sub-tree being moved
- * @param destinationPrefix The root of the destination sub-tree
- * @param move true
for a move, false
for a copy
- * @return Whether to move or copy the child
- */
- boolean moveOrCopy(
- IResource resource,
- final IPath sourcePrefix,
- final IPath destinationPrefix,
- final boolean move) {
- ProposedResourceDelta sourceDelta = getDelta(resource);
- if (sourceDelta.getKind() == IResourceDelta.REMOVED) {
- // There is already a removed delta here so there
- // is nothing to move/copy
- return false;
- }
- IResource destinationResource =
- getDestinationResource(resource, sourcePrefix, destinationPrefix);
- ProposedResourceDelta destinationDelta = getDelta(destinationResource);
- if ((destinationDelta.getKind() & (IResourceDelta.ADDED | IResourceDelta.CHANGED)) > 0) {
- // There is already a resource at the destination
- // TODO: What do we do
- return false;
- }
- // First, create the delta for the source
- IPath fromPath = resource.getFullPath();
- boolean wasAdded = false;
- final int sourceFlags = sourceDelta.getFlags();
- if (move) {
- // We transfer the source flags to the destination
- if (sourceDelta.getKind() == IResourceDelta.ADDED) {
- if ((sourceFlags & IResourceDelta.MOVED_FROM) != 0) {
- // The resource was moved from somewhere else so
- // we need to transfer the path to the new location
- fromPath = sourceDelta.getMovedFromPath();
- sourceDelta.setMovedFromPath(null);
- }
- // The source was added and then moved so we'll
- // make it an add at the destination
- sourceDelta.setKind(0);
- wasAdded = true;
- } else {
- // We reset the status to be a remove/move_to
- sourceDelta.setKind(IResourceDelta.REMOVED);
- sourceDelta.setFlags(IResourceDelta.MOVED_TO);
- sourceDelta.setMovedToPath(
- destinationPrefix.append(fromPath.removeFirstSegments(sourcePrefix.segmentCount())));
- }
- }
- // Next, create the delta for the destination
- if (destinationDelta.getKind() == IResourceDelta.REMOVED) {
- // The destination was removed and is being re-added
- destinationDelta.setKind(IResourceDelta.CHANGED);
- destinationDelta.addFlags(IResourceDelta.REPLACED);
- } else {
- destinationDelta.setKind(IResourceDelta.ADDED);
- }
- if (!wasAdded || !fromPath.equals(resource.getFullPath())) {
- // The source wasn't added so it is a move/copy
- destinationDelta.addFlags(move ? IResourceDelta.MOVED_FROM : IResourceDelta.COPIED_FROM);
- destinationDelta.setMovedFromPath(fromPath);
- // Apply the source flags
- if (move) destinationDelta.addFlags(sourceFlags);
- }
-
- return true;
- }
-
- /**
- * Helper method that generate a move or copy delta for a sub-tree of resources being moved or
- * copied.
- */
- private void moveOrCopyDeep(IResource resource, IPath destination, final boolean move) {
- final IPath sourcePrefix = resource.getFullPath();
- final IPath destinationPrefix = destination;
- try {
- // build delta for the entire sub-tree if available
- if (resource.isAccessible()) {
- resource.accept(
- new IResourceVisitor() {
- public boolean visit(IResource child) {
- return moveOrCopy(child, sourcePrefix, destinationPrefix, move);
- }
- });
- } else {
- // just build a delta for the single resource
- moveOrCopy(resource, sourcePrefix, destination, move);
- }
- } catch (CoreException e) {
- fail(e);
- }
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/utils/Policy.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/utils/Policy.java
deleted file mode 100644
index 7b5ce058a0c..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/utils/Policy.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
configuration name which is resolved to the
- * referenced project's current active build configuration at build time.
- *
- * null
if there are no
- * arguments. The argument names and values are both strings.
- *
- * @return a table of command arguments (key type : String
value type : String
- *
), or null
- * @see #setArguments(Map)
- */
- public Mapnull
if the name has
- * not been set.
- *
- * @return the name of the builder, or null
if not set
- * @see #setBuilderName(String)
- */
- public String getBuilderName();
-
- /**
- * Returns whether this build command responds to the given kind of build.
- *
- * IncrementalProjectBuilder
- *
- * @return true
if this build command responds to the specified kind of build, and
- * false
otherwise.
- * @see #setBuilding(int, boolean)
- * @since 3.1
- */
- public boolean isBuilding(int kind);
-
- /**
- * Returns whether this command allows configuring of what kinds of builds it responds to. By
- * default, commands are only configurable if the corresponding builder defines the {@link
- * #isConfigurable} attribute in its builder extension declaration. A command that is not
- * configurable will always respond to all kinds of builds.
- *
- * @return true
If this command allows configuration of what kinds of builds it
- * responds to, and false
otherwise.
- * @see #setBuilding(int, boolean)
- * @since 3.1
- */
- public boolean isConfigurable();
-
- /**
- * Sets this command's arguments to be the given table of name-values pairs, or to null
- *
if there are no arguments. The argument names and values are both strings.
- *
- * String
- *
), or null
- * @see #getArguments()
- */
- public void setArguments(Map
- * org.eclipse.core.resources.builders
extension point.
- *
- * @param builderName the name of the builder
- * @see #getBuilderName()
- */
- public void setBuilderName(String builderName);
-
- /**
- * Specifies whether this build command responds to the provided kind of build.
- *
- *
- *
- *
- * @param kind One of the *_BUILD constants defined on IncrementalProjectBuilder
- *
- * @param value true
if this build command responds to the specified kind of build,
- * and false
otherwise.
- * @see #isBuilding(int)
- * @see #isConfigurable()
- * @see IWorkspace#build(int, IProgressMonitor)
- * @see IProject#build(int, IProgressMonitor)
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IncrementalProjectBuilder#AUTO_BUILD
- * @see IncrementalProjectBuilder#CLEAN_BUILD
- * @since 3.1
- */
- public void setBuilding(int kind, boolean value);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IContainer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IContainer.java
deleted file mode 100644
index 18489eb8441..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IContainer.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see Platform#getAdapterManager()
- * @see IProject
- * @see IFolder
- * @see IWorkspaceRoot
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IContainer extends IResource, IAdaptable {
-
- /*====================================================================
- * Constants defining which members are wanted:
- *====================================================================*/
-
- /**
- * Member constant (bit mask value 1) indicating that phantom member resources are to be included.
- *
- * @see IResource#isPhantom()
- * @since 2.0
- */
- public static final int INCLUDE_PHANTOMS = 1;
-
- /**
- * Member constant (bit mask value 2) indicating that team private members are to be included.
- *
- * @see IResource#isTeamPrivateMember()
- * @since 2.0
- */
- public static final int INCLUDE_TEAM_PRIVATE_MEMBERS = 2;
-
- /**
- * Member constant (bit mask value 4) indicating that derived resources are to be excluded.
- *
- * @see IResource#isDerived()
- * @since 3.1
- */
- public static final int EXCLUDE_DERIVED = 4;
-
- /**
- * Member constant (bit mask value 8) indicating that hidden resources are to be included.
- *
- * @see IResource#isHidden()
- * @since 3.4
- */
- public static final int INCLUDE_HIDDEN = 8;
-
- /**
- * Member constant (bit mask value 16) indicating that a resource should not be checked for
- * existence.
- *
- * @see IResource#accept(IResourceProxyVisitor, int)
- * @see IResource#accept(IResourceVisitor, int, int)
- * @since 3.8
- */
- public static final int DO_NOT_CHECK_EXISTENCE = 16;
-
- /**
- * Returns whether a resource of some type with the given path exists relative to this resource.
- * The supplied path may be absolute or relative; in either case, it is interpreted as relative to
- * this resource. Trailing separators are ignored. If the path is empty this container is checked
- * for existence.
- *
- * @param path the path of the resource
- * @return true
if a resource of some type with the given path exists relative to
- * this resource, and false
otherwise
- * @see IResource#exists()
- */
- public boolean exists(IPath path);
-
- /**
- * Finds and returns the member resource identified by the given path in this container, or
- * null
if no such resource exists. The supplied path may be absolute or relative; in
- * either case, it is interpreted as relative to this resource. Trailing separators and the path's
- * device are ignored. If the path is empty this container is returned. Parent references in the
- * supplied path are discarded if they go above the workspace root.
- *
- * members
- *
.
- *
- * path
contains a relative path to the resource and all path special
- * characters will be interpreted. Passing an empty string will result in returning this {@link
- * IContainer} itself.
- *
- * @param path the relative path to the member resource, must be a valid path or path segment
- * @return the member resource, or null
if no such resource exists
- * @see #members()
- * @see IPath#isValidPath(String)
- * @see IPath#isValidSegment(String)
- */
- public IResource findMember(String path);
-
- /**
- * Finds and returns the member resource identified by the given path in this container, or
- * null
if no such resource exists. The supplied path may be absolute or relative; in
- * either case, it is interpreted as relative to this resource. Trailing separators and the path's
- * device are ignored. If the path is empty this container is returned. Parent references in the
- * supplied path are discarded if they go above the workspace root.
- *
- * includePhantoms
argument is false
, only a member resource
- * with the given path that exists will be returned. If the includePhantoms
argument
- * is true
, the method also returns a resource if the workspace is keeping track of a
- * phantom with that path.
- *
- * members
- *
.
- *
- * path
contains a relative path to the resource and all path special
- * characters will be interpreted. Passing an empty string will result in returning this {@link
- * IContainer} itself.
- *
- * @param path the relative path to the member resource, must be a valid path or path segment
- * @param includePhantoms true
if phantom resources are of interest; false
- *
if phantom resources are not of interest
- * @return the member resource, or null
if no such resource exists
- * @see #members(boolean)
- * @see IResource#isPhantom()
- * @see IPath#isValidPath(String)
- * @see IPath#isValidSegment(String)
- */
- public IResource findMember(String path, boolean includePhantoms);
-
- /**
- * Finds and returns the member resource identified by the given path in this container, or
- * null
if no such resource exists. The supplied path may be absolute or relative; in
- * either case, it is interpreted as relative to this resource. Trailing separators and the path's
- * device are ignored. If the path is empty this container is returned. Parent references in the
- * supplied path are discarded if they go above the workspace root.
- *
- * members
- *
.
- *
- * null
if no such resource exists
- */
- public IResource findMember(IPath path);
-
- /**
- * Finds and returns the member resource identified by the given path in this container, or
- * null
if no such resource exists. The supplied path may be absolute or relative; in
- * either case, it is interpreted as relative to this resource. Trailing separators and the path's
- * device are ignored. If the path is empty this container is returned. Parent references in the
- * supplied path are discarded if they go above the workspace root.
- *
- * includePhantoms
argument is false
, only a member resource
- * with the given path that exists will be returned. If the includePhantoms
argument
- * is true
, the method also returns a resource if the workspace is keeping track of a
- * phantom with that path.
- *
- * members
- *
.
- *
- * true
if phantom resources are of interest; false
- *
if phantom resources are not of interest
- * @return the member resource, or null
if no such resource exists
- * @see #members(boolean)
- * @see IResource#isPhantom()
- */
- public IResource findMember(IPath path, boolean includePhantoms);
-
- /**
- * Returns the default charset for resources in this container.
- *
- *
- * getDefaultCharset(true);
- *
- *
- * UnsupportedEncodingException
where this charset is
- * used.
- *
- * @return the name of the default charset encoding for this container
- * @exception CoreException if this method fails
- * @see IContainer#getDefaultCharset(boolean)
- * @see IFile#getCharset()
- * @since 3.0
- */
- public String getDefaultCharset() throws CoreException;
-
- /**
- * Returns the default charset for resources in this container.
- *
- * false
, this method will return the charset defined by
- * calling #setDefaultCharset, provided this container exists, or null
otherwise.
- *
- * true
, this method uses the following algorithm to determine
- * the charset to be returned:
- *
- *
- *
- *
- * UnsupportedEncodingException
where this charset is
- * used.
- *
- * @return the name of the default charset encoding for this container, or null
- * @exception CoreException if this method fails
- * @see IFile#getCharset()
- * @since 3.0
- */
- public String getDefaultCharset(boolean checkImplicit) throws CoreException;
-
- /**
- * Returns a handle to the file identified by the given path in this container.
- *
- * members(IResource.NONE)
.
- * Team-private member resources are not included in the result.
- *
- *
- *
- *
- * @see #findMember(IPath)
- * @see IResource#isAccessible()
- */
- public IResource[] members() throws CoreException;
-
- /**
- * Returns a list of all member resources (projects, folders and files) in this resource, in no
- * particular order.
- *
- *
- * members(includePhantoms ? INCLUDE_PHANTOMS : IResource.NONE);
- *
- *
- * Team-private member resources are not included in the result.
- *
- * @param includePhantoms true
if phantom resources are of interest; false
- *
if phantom resources are not of interest
- * @return an array of members of this resource
- * @exception CoreException if this request fails. Reasons include:
- *
- *
- *
- * @see #members(int)
- * @see IResource#exists()
- * @see IResource#isPhantom()
- */
- public IResource[] members(boolean includePhantoms) throws CoreException;
-
- /**
- * Returns a list of all member resources (projects, folders and files) in this resource, in no
- * particular order.
- *
- * includePhantoms
is false
and this resource does not exist.
- * includePhantoms
is false
and this resource is a project
- * that is not open.
- * INCLUDE_PHANTOMS
flag is not specified in the member flags
- * (recommended), only member resources that exist will be returned. If the INCLUDE_PHANTOMS
- *
flag is specified, the result will also include any phantom member resources the
- * workspace is keeping track of.
- *
- * INCLUDE_TEAM_PRIVATE_MEMBERS
flag is specified in the member flags, team
- * private members will be included along with the others. If the
- * INCLUDE_TEAM_PRIVATE_MEMBERS
flag is not specified (recommended), the result will omit
- * any team private member resources.
- *
- * EXCLUDE_DERIVED
flag is not specified, derived resources are included.
- * If the EXCLUDE_DERIVED
flag is specified in the member flags, derived resources
- * are not included.
- *
- * @param memberFlags bit-wise or of member flag constants ({@link #INCLUDE_PHANTOMS}, {@link
- * #INCLUDE_TEAM_PRIVATE_MEMBERS}, {@link #INCLUDE_HIDDEN} and {@link #EXCLUDE_DERIVED})
- * indicating which members are of interest
- * @return an array of members of this resource
- * @exception CoreException if this request fails. Reasons include:
- *
- *
- *
- * @see IResource#exists()
- * @since 2.0
- */
- public IResource[] members(int memberFlags) throws CoreException;
-
- /**
- * Returns a list of recently deleted files inside this container that have one or more saved
- * states in the local history. The depth parameter determines how deep inside the container to
- * look. This resource may or may not exist in the workspace.
- *
- * INCLUDE_PHANTOMS
flag is not specified and this resource does not
- * exist.
- * INCLUDE_PHANTOMS
flag is not specified and this resource is a
- * project that is not open.
- * DEPTH_ZERO
, DEPTH_ONE
or
- * DEPTH_INFINITE
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @return an array of recently deleted files
- * @exception CoreException if this method fails
- * @see IFile#getHistory(IProgressMonitor)
- * @since 2.0
- */
- public IFile[] findDeletedMembersWithHistory(int depth, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Sets the default charset for this container. Passing a value of null
will remove
- * the default charset setting for this resource.
- *
- * @param charset a charset string, or null
- * @exception CoreException if this method fails Reasons include:
- *
- *
- *
- * @see IContainer#getDefaultCharset()
- * @since 3.0
- * @deprecated Replaced by {@link #setDefaultCharset(String, IProgressMonitor)} which is a
- * workspace operation and reports changes in resource deltas.
- */
- @Deprecated
- public void setDefaultCharset(String charset) throws CoreException;
-
- /**
- * Sets the default charset for this container. Passing a value of null
will remove
- * the default charset setting for this resource.
- *
- * null
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @exception CoreException if this method fails Reasons include:
- *
- *
- *
- * @see IContainer#getDefaultCharset()
- * @see IResourceRuleFactory#charsetRule(IResource)
- * @since 3.0
- */
- public void setDefaultCharset(String charset, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Adds a new filter to this container. Filters restrict the set of files and directories in the
- * underlying file system that will be included as members of this container.
- *
- * null
if progress reporting is not desired
- * @return the description of the added filter
- * @exception CoreException if this filter could not be added. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #getFilters()
- * @see IResourceFilterDescription#delete(int, IProgressMonitor)
- * @since 3.6
- */
- public IResourceFilterDescription createFilter(
- int type,
- FileInfoMatcherDescription matcherDescription,
- int updateFlags,
- IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Retrieve all filters on this container. If no filters exist for this resource, an empty array
- * is returned.
- *
- * @return an array of filters
- * @exception CoreException if this resource's filters could not be retrieved. Reasons include:
- * IResourceChangeEvent
for more details.
- *
- *
IEncodedStorage
interface extends IStorage
in order to provide
- * access to the charset to be used when decoding its contents.
- *
- * null
if a proper encoding cannot be determined.
- *
- * UnsupportedEncodingException
where this charset is
- * used.
- *
- * @return the name of a charset, or null
- * @exception CoreException if an error happens while determining the charset. See any refinements
- * for more information.
- * @see IStorage#getContents()
- */
- public String getCharset() throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFile.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFile.java
deleted file mode 100644
index 3ff78b024af..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFile.java
+++ /dev/null
@@ -1,1025 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IFile extends IResource, IEncodedStorage, IAdaptable {
- /**
- * Character encoding constant (value 0) which identifies files that have an unknown character
- * encoding scheme.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_UNKNOWN = 0;
- /**
- * Character encoding constant (value 1) which identifies files that are encoded with the US-ASCII
- * character encoding scheme.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_US_ASCII = 1;
- /**
- * Character encoding constant (value 2) which identifies files that are encoded with the
- * ISO-8859-1 character encoding scheme, also known as ISO-LATIN-1.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_ISO_8859_1 = 2;
- /**
- * Character encoding constant (value 3) which identifies files that are encoded with the UTF-8
- * character encoding scheme.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_UTF_8 = 3;
- /**
- * Character encoding constant (value 4) which identifies files that are encoded with the UTF-16BE
- * character encoding scheme.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_UTF_16BE = 4;
- /**
- * Character encoding constant (value 5) which identifies files that are encoded with the UTF-16LE
- * character encoding scheme.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_UTF_16LE = 5;
- /**
- * Character encoding constant (value 6) which identifies files that are encoded with the UTF-16
- * character encoding scheme.
- *
- * @see IFile#getEncoding()
- * @deprecated see getEncoding for details
- */
- @Deprecated public int ENCODING_UTF_16 = 6;
-
- /**
- * Appends the entire contents of the given stream to this file.
- *
- *
- * appendContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #appendContents(java.io.InputStream,int,IProgressMonitor)
- */
- public void appendContents(
- InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Appends the entire contents of the given stream to this file. The stream, which must not be
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * null
, will get closed whether this method succeeds or fails.
- *
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to overwrite a corresponding file in the local file
- * system provided it is in sync with the workspace. This option ensures there is no unintended
- * data loss; it is the recommended setting. However, if FORCE
is specified, an
- * attempt will be made to write a corresponding file in the local file system, overwriting any
- * existing one if need be. In either case, if this method succeeds, the resource will be marked
- * as being local (even if it wasn't before).
- *
- * FORCE
is specified and the file exists in the local file system. In this case the
- * file is made local and the given contents are appended.
- *
- * KEEP_HISTORY
update flag controls whether or not a copy of current contents
- * of this file should be captured in the workspace's local history (properties are not recorded
- * in the local history). The local history mechanism serves as a safety net to help the user
- * recover from mistakes that might otherwise result in data loss. Specifying KEEP_HISTORY
- *
is recommended except in circumstances where past states of the files are of no
- * conceivable interest to the user. Note that local history is maintained with each individual
- * project, and gets discarded when a project is deleted from the workspace. This flag is ignored
- * if the file was not previously local.
- *
- * FORCE
and KEEP_HISTORY
are ignored.
- *
- * IFileModificationValidator.validateSave
on this file. If
- * the validation fails, then this operation will fail.
- *
- * FORCE
and
- * KEEP_HISTORY
)
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#modifyRule(IResource)
- * @since 2.0
- */
- public void appendContents(InputStream source, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates a new file resource as a member of this handle's parent resource.
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- *
- * create(source, (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
- * if the file should be marked as not local
- * @param force a flag controlling how to deal with resources that are not in sync with the local
- * file system
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- */
- public void create(InputStream source, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates a new file resource as a member of this handle's parent resource. The resource's
- * contents are supplied by the data in the given stream. This method closes the stream whether it
- * succeeds or fails. If the stream is IWorkspace.validateName
- *
).
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * null
then a file is not created in the local
- * file system and the created file resource is marked as being non-local.
- *
- * true
immediately after creating the
- * resource.
- *
- * true
- * immediately after creating the resource.
- *
- * true
immediately after creating the
- * resource.
- *
- * null
- * if the file should be marked as not local
- * @param updateFlags bit-wise or of update flag constants ({@link IResource#FORCE}, {@link
- * IResource#DERIVED}, and {@link IResource#TEAM_PRIVATE})
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#createRule(IResource)
- * @since 2.0
- */
- public void create(InputStream source, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates a new file resource as a member of this handle's parent resource. The file's contents
- * will be located in the file specified by the given file system path. The given path must be
- * either an absolute file system path, or a relative path whose first segment is the name of a
- * workspace path variable.
- *
- * IWorkspace.validateName
- *
).
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * true
immediately after creating the
- * resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#isLinked()
- * @see IResource#ALLOW_MISSING_LOCAL
- * @see IResource#REPLACE
- * @see IResource#HIDDEN
- * @since 2.1
- */
- public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates a new file resource as a member of this handle's parent resource. The file's contents
- * will be located in the file specified by the given URI. The given URI must be either absolute,
- * or a relative URI whose first path segment is the name of a workspace path variable.
- *
- * IWorkspace.validateName
- *
).
- * ALLOW_MISSING_LOCAL
is not specified.
- * IResourceChangeEvent
for more details.
- * ALLOW_MISSING_LOCAL
update flag controls how this method deals with cases
- * where the file system file to be linked does not exist, or is relative to a workspace path
- * variable that is not defined. If ALLOW_MISSING_LOCAL
is specified, the operation
- * will succeed even if the local file is missing, or the path is relative to an undefined
- * variable. If ALLOW_MISSING_LOCAL
is not specified, the operation will fail in the
- * case where the file system file does not exist or the path is relative to an undefined
- * variable.
- *
- * true
immediately after creating the
- * resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#isLinked()
- * @see IResource#ALLOW_MISSING_LOCAL
- * @see IResource#REPLACE
- * @see IResource#HIDDEN
- * @since 3.2
- */
- public void createLink(URI location, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Deletes this file from the workspace.
- *
- * IWorkspace.validateName
- *
).
- * ALLOW_MISSING_LOCAL
is not specified.
- * IResourceChangeEvent
for more details.
- *
- * delete((keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#delete(int,IProgressMonitor)
- * @see IResourceRuleFactory#deleteRule(IResource)
- */
- public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns the name of a charset to be used when decoding the contents of this file into
- * characters.
- *
- * force
is
- * false
.
- * IResourceChangeEvent
for more details.
- *
- * getCharset(true);
- *
- *
- * UnsupportedEncodingException
where this
- * charset is used.
- *
- *
- *
- *
- * @see IFile#getCharset(boolean)
- * @see IEncodedStorage#getCharset()
- * @see IContainer#getDefaultCharset()
- * @since 3.0
- */
- public String getCharset() throws CoreException;
-
- /**
- * Returns the name of a charset to be used when decoding the contents of this file into
- * characters.
- *
- * false
, this method will return the charset defined by
- * calling setCharset
, provided this file exists, or null
otherwise.
- *
- * true
, this method uses the following algorithm to determine
- * the charset to be returned:
- *
- *
- *
- *
- *
- * IContainer#getDefaultCharset
).
- * UnsupportedEncodingException
where this
- * charset is used.
- *
- * null
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IEncodedStorage#getCharset()
- * @see IContainer#getDefaultCharset()
- * @since 3.0
- */
- public String getCharset(boolean checkImplicit) throws CoreException;
-
- /**
- * Returns the name of a charset to be used to encode the given contents when saving to this file.
- * This file does not have to exist. The character stream is not automatically closed.
- *
- *
- *
- *
- *
- * IContainer#getDefaultCharset
).
- * UnsupportedEncodingException
where this
- * charset is used.
- *
- * @param reader a character stream containing the contents to be saved into this file
- * @return the name of a charset
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getCharset(boolean)
- * @see IContainer#getDefaultCharset()
- * @since 3.1
- */
- public String getCharsetFor(Reader reader) throws CoreException;
-
- /**
- * Returns a description for this file's current contents. Returns null
if a
- * description cannot be obtained.
- *
- *
- * getDescriptionFor(getContents(), getName(), IContentDescription.ALL)
on
- * IContentTypeManager
, but provides better opportunities for improved performance.
- * Therefore, when manipulating IFile
s, clients should call this method instead of
- * IContentTypeManager.getDescriptionFor
.
- *
- * @return a description for this file's current contents, or null
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IContentDescription
- * @see IContentTypeManager#getDescriptionFor(InputStream, String, QualifiedName[])
- * @since 3.0
- */
- public IContentDescription getContentDescription() throws CoreException;
-
- /**
- * Returns an open input stream on the contents of this file.
- *
- *
- * getContents(RefreshManager#PREF_LIGHTWEIGHT_AUTO_REFRESH);
- *
- *
- *
- *
- */
- public InputStream getContents() throws CoreException;
-
- /**
- * This refinement of the corresponding IStorage
method returns an open input stream
- * on the contents of this file. The client is responsible for closing the stream when finished.
- * If force is true
the file is opened and an input stream returned regardless of the
- * sync state of the file. The file is not synchronized with the workspace. If force is
- * false
the method fails if not in sync.
- *
- * @param force a flag controlling how to deal with resources that are not in sync with the local
- * file system
- * @return an input stream containing the contents of the file
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public InputStream getContents(boolean force) throws CoreException;
-
- /**
- * Returns a constant identifying the character encoding of this file, or ENCODING_UNKNOWN if it
- * could not be determined. The returned constant will be one of the ENCODING_* constants defined
- * on IFile.
- *
- * false
.
- *
- *
- *
- * @deprecated use IFile#getCharset instead
- */
- @Deprecated
- public int getEncoding() throws CoreException;
-
- /**
- * Returns the full path of this file. This refinement of the corresponding IStorage
- * and IResource
methods links the semantics of resource and storage object paths
- * such that IFile
s always have a path and that path is relative to the containing
- * workspace.
- *
- * @see IResource#getFullPath()
- * @see IStorage#getFullPath()
- */
- public IPath getFullPath();
-
- /**
- * Returns a list of past states of this file known to this workspace. Recently added states
- * first.
- *
- * null
if progress reporting is not desired
- * @return an array of states of this file
- * @exception CoreException if this method fails.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- */
- public IFileState[] getHistory(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Returns the name of this file. This refinement of the corresponding IStorage
and
- * IResource
methods links the semantics of resource and storage object names such
- * that IFile
s always have a name and that name equivalent to the last segment of its
- * full path.
- *
- * @see IResource#getName()
- * @see IStorage#getName()
- */
- public String getName();
-
- /**
- * Returns whether this file is read-only. This refinement of the corresponding IStorage
- *
and IResource
methods links the semantics of read-only resources and
- * read-only storage objects.
- *
- * @see IResource#isReadOnly()
- * @see IStorage#isReadOnly()
- */
- public boolean isReadOnly();
-
- /**
- * Moves this resource to be at the given location.
- *
- *
- * move(destination, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#move(IPath,int,IProgressMonitor)
- * @see IResourceRuleFactory#moveRule(IResource, IResource)
- */
- public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Sets the charset for this file. Passing a value of force
is
- * false
.
- * IResourceChangeEvent
for more details.
- * null
will remove the charset
- * setting for this resource.
- *
- * @param newCharset a charset name, or null
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getCharset()
- * @since 3.0
- * @deprecated Replaced by {@link #setCharset(String, IProgressMonitor)} which is a workspace
- * operation and reports changes in resource deltas.
- */
- @Deprecated
- public void setCharset(String newCharset) throws CoreException;
-
- /**
- * Sets the charset for this file. Passing a value of null
will remove the charset
- * setting for this resource.
- *
- * null
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getCharset()
- * @see IResourceRuleFactory#charsetRule(IResource)
- * @since 3.0
- */
- public void setCharset(String newCharset, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Sets the contents of this file to the bytes in the given input stream.
- *
- *
- * setContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #setContents(java.io.InputStream,int,IProgressMonitor)
- */
- public void setContents(
- InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Sets the contents of this file to the bytes in the given file state.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- *
- * setContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #setContents(IFileState,int,IProgressMonitor)
- */
- public void setContents(
- IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Sets the contents of this file to the bytes in the given input stream. The stream will get
- * closed whether this method succeeds or fails. If the stream is force
is false
.
- * IResourceChangeEvent
for more details.
- * null
then the
- * content is set to be the empty sequence of bytes.
- *
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to overwrite a corresponding file in the local file
- * system provided it is in sync with the workspace. This option ensures there is no unintended
- * data loss; it is the recommended setting. However, if FORCE
is specified, an
- * attempt will be made to write a corresponding file in the local file system, overwriting any
- * existing one if need be. In either case, if this method succeeds, the resource will be marked
- * as being local (even if it wasn't before).
- *
- * KEEP_HISTORY
update flag controls whether or not a copy of current contents
- * of this file should be captured in the workspace's local history (properties are not recorded
- * in the local history). The local history mechanism serves as a safety net to help the user
- * recover from mistakes that might otherwise result in data loss. Specifying KEEP_HISTORY
- *
is recommended except in circumstances where past states of the files are of no
- * conceivable interest to the user. Note that local history is maintained with each individual
- * project, and gets discarded when a project is deleted from the workspace. This flag is ignored
- * if the file was not previously local.
- *
- * FORCE
and KEEP_HISTORY
are ignored.
- *
- * IFileModificationValidator.validateSave
on this file. If
- * the validation fails, then this operation will fail.
- *
- * FORCE
and
- * KEEP_HISTORY
)
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#modifyRule(IResource)
- * @since 2.0
- */
- public void setContents(InputStream source, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Sets the contents of this file to the bytes in the given file state.
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to overwrite a corresponding file in the local file
- * system provided it is in sync with the workspace. This option ensures there is no unintended
- * data loss; it is the recommended setting. However, if FORCE
is specified, an
- * attempt will be made to write a corresponding file in the local file system, overwriting any
- * existing one if need be. In either case, if this method succeeds, the resource will be marked
- * as being local (even if it wasn't before).
- *
- * KEEP_HISTORY
update flag controls whether or not a copy of current contents
- * of this file should be captured in the workspace's local history (properties are not recorded
- * in the local history). The local history mechanism serves as a safety net to help the user
- * recover from mistakes that might otherwise result in data loss. Specifying KEEP_HISTORY
- *
is recommended except in circumstances where past states of the files are of no
- * conceivable interest to the user. Note that local history is maintained with each individual
- * project, and gets discarded when a project is deleted from the workspace. This flag is ignored
- * if the file was not previously local.
- *
- * FORCE
and KEEP_HISTORY
are ignored.
- *
- * IFileModificationValidator.validateSave
on this file. If
- * the validation fails, then this operation will fail.
- *
- * FORCE
and
- * KEEP_HISTORY
)
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#modifyRule(IResource)
- * @since 2.0
- */
- public void setContents(IFileState source, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFileModificationValidator.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFileModificationValidator.java
deleted file mode 100644
index b408c2edeed..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFileModificationValidator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * null
, the validator must attempt to perform the validation in a headless manner.
- * The returned status is IStatus.OK
if this validator believes the given file can be
- * modified. Other return statuses indicate the reason why the individual files cannot be
- * modified.
- *
- * @param files the files that are to be modified; these files must all exist in the workspace
- * @param context the org.eclipse.swt.widgets.Shell
that is to be used to parent any
- * dialogs with the user, or null
if there is no UI context (declared as an
- * Object
to avoid any direct references on the SWT component)
- * @return a status object that is OK if things are fine, otherwise a status describing reasons
- * why modifying the given files is not reasonable
- * @see IWorkspace#validateEdit(IFile[], Object)
- */
- public IStatus validateEdit(IFile[] files, Object context);
-
- /**
- * Validates that the given file can be saved. This method is called from IFile#setContents
- *
and IFile#appendContents
before any attempt to write data to disk. The
- * returned status is IStatus.OK
if this validator believes the given file can be
- * successfully saved. In all other cases the return value is a non-OK status. Note that a return
- * value of IStatus.OK
does not guarantee that the save will succeed.
- *
- * @param file the file that is to be modified; this file must exist in the workspace
- * @return a status indicating whether or not it is reasonable to try writing to the given file;
- * IStatus.OK
indicates a save should be attempted.
- * @see IFile#setContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor)
- * @see IFile#appendContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validateSave(IFile file);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFileState.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFileState.java
deleted file mode 100644
index 7de9c020034..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFileState.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IAdaptable
interface; extensions are managed by
- * the platform's adapter manager.
- *
- * @see IFile
- * @see IStorage
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IFileState extends IEncodedStorage, IAdaptable {
- /**
- * Returns whether this file state still exists in the local history.
- *
- * @return true
if this state exists, and false
if it does not
- */
- public boolean exists();
-
- /**
- * Returns an open input stream on the contents of this file state. This refinement of the
- * corresponding IStorage
method returns an open input stream on the contents this
- * file state represents. The client is responsible for closing the stream when finished.
- *
- * @return an input stream containing the contents of the file
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public InputStream getContents() throws CoreException;
-
- /**
- * Returns the full path of this file state. This refinement of the corresponding IStorage
- *
method specifies that IFileState
s always have a path and that path is the
- * full workspace path of the file represented by this state.
- *
- * @see IResource#getFullPath()
- * @see IStorage#getFullPath()
- */
- public IPath getFullPath();
-
- /**
- * Returns the modification time of the file. If you create a file at 9:00 and modify it at 11:00,
- * the file state added to the history at 11:00 will have 9:00 as its modification time.
- *
- * IStorage
- * method specifies that IFileState
s always have a name and that name is equivalent
- * to the last segment of the full path of the resource represented by this state.
- *
- * @see IResource#getName()
- * @see IStorage#getName()
- */
- public String getName();
-
- /**
- * Returns whether this file state is read-only. This refinement of the corresponding
- * IStorage
method restricts IFileState
s to always be read-only.
- *
- * @see IStorage
- */
- public boolean isReadOnly();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFilterMatcherDescriptor.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFilterMatcherDescriptor.java
deleted file mode 100644
index 60ddb30e44b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IFilterMatcherDescriptor.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2009
- * Freescale Semiconductor 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * plugin.xml
) files.
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IFolder extends IContainer, IAdaptable {
-
- /**
- * Creates a new folder resource as a member of this handle's parent resource.
- *
- *
- * create((force ? FORCE : IResource.NONE), local, monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IFolder#create(int,boolean,IProgressMonitor)
- */
- public void create(boolean force, boolean local, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Creates a new folder resource as a member of this handle's parent resource.
- *
- * IWorkspace.validateName
- *
).
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to create a directory in the local file system if there
- * isn't one already. This option ensures there is no unintended data loss; it is the recommended
- * setting. However, if FORCE
is specified, this method will be deemed a success even
- * if there already is a corresponding directory.
- *
- * true
immediately after creating the
- * resource.
- *
- * true
- * immediately after creating the resource.
- *
- * true
immediately after creating the
- * resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#createRule(IResource)
- * @since 2.0
- */
- public void create(int updateFlags, boolean local, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Creates a new folder resource as a member of this handle's parent resource. The folder's
- * contents will be located in the directory specified by the given file system path. The given
- * path must be either an absolute file system path, or a relative path whose first segment is the
- * name of a workspace path variable.
- *
- * IWorkspace.validateName
- *
).
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * ALLOW_MISSING_LOCAL
update flag controls how this method deals with cases
- * where the local file system directory to be linked does not exist, or is relative to a
- * workspace path variable that is not defined. If ALLOW_MISSING_LOCAL
is specified,
- * the operation will succeed even if the local directory is missing, or the path is relative to
- * an undefined variable. If ALLOW_MISSING_LOCAL
is not specified, the operation will
- * fail in the case where the local file system directory does not exist or the path is relative
- * to an undefined variable.
- *
- * true
immediately after creating the
- * resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#isLinked()
- * @see IResource#ALLOW_MISSING_LOCAL
- * @see IResource#REPLACE
- * @see IResource#BACKGROUND_REFRESH
- * @see IResource#HIDDEN
- * @since 2.1
- */
- public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates a new folder resource as a member of this handle's parent resource. The folder's
- * contents will be located in the directory specified by the given file system URI. The given URI
- * must be either absolute, or a relative URI whose first path segment is the name of a workspace
- * path variable.
- *
- * IWorkspace.validateName
- *
).
- * ALLOW_MISSING_LOCAL
is not specified.
- * IResourceChangeEvent
for more details.
- * ALLOW_MISSING_LOCAL
update flag controls how this method deals with cases
- * where the local file system directory to be linked does not exist, or is relative to a
- * workspace path variable that is not defined. If ALLOW_MISSING_LOCAL
is specified,
- * the operation will succeed even if the local directory is missing, or the path is relative to
- * an undefined variable. If ALLOW_MISSING_LOCAL
is not specified, the operation will
- * fail in the case where the local file system directory does not exist or the path is relative
- * to an undefined variable.
- *
- * true
immediately after creating the
- * resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#isLinked()
- * @see IResource#ALLOW_MISSING_LOCAL
- * @see IResource#REPLACE
- * @see IResource#BACKGROUND_REFRESH
- * @see IResource#HIDDEN
- * @since 3.2
- */
- public void createLink(URI location, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Deletes this resource from the workspace.
- *
- * IWorkspace.validateName
- *
).
- * ALLOW_MISSING_LOCAL
is not specified.
- * IResourceChangeEvent
for more details.
- *
- * delete((keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#deleteRule(IResource)
- * @see IResource#delete(int,IProgressMonitor)
- */
- public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns a handle to the file with the given name in this folder.
- *
- * force
is
- * false
.
- * IResourceChangeEvent
for more details.
- *
- * move(destination, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#moveRule(IResource, IResource)
- * @see IResource#move(IPath,int,IProgressMonitor)
- */
- public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IMarker.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IMarker.java
deleted file mode 100644
index a24de5fc4aa..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IMarker.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * IResources
are handles.
- * Instances of IMarker
do not hold the attributes themselves but rather uniquely refer
- * to the attribute container. As such, their state may change underneath the handle with no warning
- * to the holder of the handle. The Resources plug-in provides a general framework for defining and
- * manipulating markers and provides several standard marker types.
- *
- *
- *
- *
- * Specific types of markers may carry additional information.
- *
- * "org.eclipse.core.resources.taskmarker"
- *
),
- *
- *
- *
- * The plug-in also provides an extension point ( org.eclipse.core.resources.marker
- * org.eclipse.core.resources.taskmarker
- * org.eclipse.core.resources.problemmarker
- * org.eclipse.core.resources.bookmark
- * org.eclipse.core.resources.textmarker
- * org.eclipse.core.resources.markers
)
- * into which other plug-ins can install marker type declaration extensions.
- *
- * plugin.xml
file of the declaring plug-in. A valid declaration contains
- * elements as defined by the extension point DTD:
- *
- *
- *
persistent
are saved when the workspace is saved,
- * except those explicitly set as transient (the TRANSIENT
attribute is set as
- * true
). A plug-in which defines a persistent marker is not directly involved in
- * saving and restoring the marker. Markers are not under version and configuration
- * management, and cannot be shared via VCM repositories.
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IMarker extends IAdaptable {
-
- /*====================================================================
- * Marker types:
- *====================================================================*/
-
- /**
- * Base marker type.
- *
- * @see #getType()
- */
- public static final String MARKER = ResourcesPlugin.PI_RESOURCES + ".marker"; // $NON-NLS-1$
-
- /**
- * Task marker type.
- *
- * @see #getType()
- */
- public static final String TASK = ResourcesPlugin.PI_RESOURCES + ".taskmarker"; // $NON-NLS-1$
-
- /**
- * Problem marker type.
- *
- * @see #getType()
- */
- public static final String PROBLEM =
- ResourcesPlugin.PI_RESOURCES + ".problemmarker"; // $NON-NLS-1$
-
- /**
- * Text marker type.
- *
- * @see #getType()
- */
- public static final String TEXT = ResourcesPlugin.PI_RESOURCES + ".textmarker"; // $NON-NLS-1$
-
- /**
- * Bookmark marker type.
- *
- * @see #getType()
- */
- public static final String BOOKMARK = ResourcesPlugin.PI_RESOURCES + ".bookmark"; // $NON-NLS-1$
-
- /*====================================================================
- * Marker attributes:
- *====================================================================*/
-
- /**
- * Severity marker attribute. A number from the set of error, warning and info severities defined
- * by the platform.
- *
- * @see #SEVERITY_ERROR
- * @see #SEVERITY_WARNING
- * @see #SEVERITY_INFO
- * @see #getAttribute(String, int)
- */
- public static final String SEVERITY = "severity"; // $NON-NLS-1$
-
- /**
- * Message marker attribute. A localized string describing the nature of the marker (e.g., a name
- * for a bookmark or task). The content and form of this attribute is not specified or interpreted
- * by the platform.
- *
- * @see #getAttribute(String, String)
- */
- public static final String MESSAGE = "message"; // $NON-NLS-1$
-
- /**
- * Location marker attribute. The location is a human-readable (localized) string which can be
- * used to distinguish between markers on a resource. As such it should be concise and aimed at
- * users. The content and form of this attribute is not specified or interpreted by the platform.
- *
- * @see #getAttribute(String, String)
- */
- public static final String LOCATION = "location"; // $NON-NLS-1$
-
- /**
- * Priority marker attribute. A number from the set of high, normal and low priorities defined by
- * the platform.
- *
- * @see #PRIORITY_HIGH
- * @see #PRIORITY_NORMAL
- * @see #PRIORITY_LOW
- * @see #getAttribute(String, int)
- */
- public static final String PRIORITY = "priority"; // $NON-NLS-1$
-
- /**
- * Done marker attribute. A boolean value indicating whether the marker (e.g., a task) is
- * considered done.
- *
- * @see #getAttribute(String, String)
- */
- public static final String DONE = "done"; // $NON-NLS-1$
-
- /**
- * Character start marker attribute. An integer value indicating where a text marker starts. This
- * attribute is zero-relative and inclusive.
- *
- * @see #getAttribute(String, String)
- */
- public static final String CHAR_START = "charStart"; // $NON-NLS-1$
-
- /**
- * Character end marker attribute. An integer value indicating where a text marker ends. This
- * attribute is zero-relative and exclusive.
- *
- * @see #getAttribute(String, String)
- */
- public static final String CHAR_END = "charEnd"; // $NON-NLS-1$
-
- /**
- * Line number marker attribute. An integer value indicating the line number for a text marker.
- * This attribute is 1-relative.
- *
- * @see #getAttribute(String, String)
- */
- public static final String LINE_NUMBER = "lineNumber"; // $NON-NLS-1$
-
- /**
- * Transient marker attribute. A boolean value indicating whether the marker (e. g., a task) is
- * considered transient even if its type is declared as persistent.
- *
- * @see #getAttribute(String, String)
- * @since 2.1
- */
- public static final String TRANSIENT = "transient"; // $NON-NLS-1$
-
- /**
- * User editable marker attribute. A boolean value indicating whether a user should be able to
- * manually change the marker (e.g. a task). The default is true
. Note that the value
- * of this attribute is to be used by the UI as a suggestion and its value will NOT be interpreted
- * by Core in any manner and will not be enforced by Core when performing any operations on
- * markers.
- *
- * @see #getAttribute(String, String)
- * @since 2.1
- */
- public static final String USER_EDITABLE = "userEditable"; // $NON-NLS-1$
-
- /**
- * Source id attribute. A string attribute that can be used by tools that generate markers to
- * indicate the source of the marker. Use of this attribute is optional and its format or
- * existence is not enforced. This attribute is intended to improve serviceability by providing a
- * value that product support personnel or automated tools can use to determine appropriate help
- * and resolutions for markers.
- *
- * @see #getAttribute(String, String)
- * @since 3.3
- */
- public static final String SOURCE_ID = "sourceId"; // $NON-NLS-1$
-
- /*====================================================================
- * Marker attributes values:
- *====================================================================*/
-
- /**
- * High priority constant (value 2).
- *
- * @see #getAttribute(String, int)
- */
- public static final int PRIORITY_HIGH = 2;
-
- /**
- * Normal priority constant (value 1).
- *
- * @see #getAttribute(String, int)
- */
- public static final int PRIORITY_NORMAL = 1;
-
- /**
- * Low priority constant (value 0).
- *
- * @see #getAttribute(String, int)
- */
- public static final int PRIORITY_LOW = 0;
-
- /**
- * Error severity constant (value 2) indicating an error state.
- *
- * @see #getAttribute(String, int)
- */
- public static final int SEVERITY_ERROR = 2;
-
- /**
- * Warning severity constant (value 1) indicating a warning.
- *
- * @see #getAttribute(String, int)
- */
- public static final int SEVERITY_WARNING = 1;
-
- /**
- * Info severity constant (value 0) indicating information only.
- *
- * @see #getAttribute(String, int)
- */
- public static final int SEVERITY_INFO = 0;
-
- /**
- * Deletes this marker from its associated resource. This method has no effect if this marker does
- * not exist.
- *
- * @exception CoreException if this marker could not be deleted. Reasons include:
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void delete() throws CoreException;
-
- /**
- * Tests this marker for equality with the given object. Two markers are equal if their id and
- * resource are both equal.
- *
- * @param object the other object
- * @return an indication of whether the objects are equal
- */
- public boolean equals(Object object);
-
- /**
- * Returns whether this marker exists in the workspace. A marker exists if its resource exists and
- * has a marker with the marker's id.
- *
- * @return IResourceChangeEvent
for more details.
- * true
if this marker exists, otherwise false
- */
- public boolean exists();
-
- /**
- * Returns the attribute with the given name. The result is an instance of one of the following
- * classes: String
, Integer
, or Boolean
. Returns null
- *
if the attribute is undefined.
- *
- * @param attributeName the name of the attribute
- * @return the value, or null
if the attribute is undefined.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public Object getAttribute(String attributeName) throws CoreException;
-
- /**
- * Returns the integer-valued attribute with the given name. Returns the given default value if
- * the attribute is undefined. or the marker does not exist or is not an integer value.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if no value is found
- * @return the value or the default value if no value was found.
- */
- public int getAttribute(String attributeName, int defaultValue);
-
- /**
- * Returns the string-valued attribute with the given name. Returns the given default value if the
- * attribute is undefined or the marker does not exist or is not a string value.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if no value is found
- * @return the value or the default value if no value was found.
- */
- public String getAttribute(String attributeName, String defaultValue);
-
- /**
- * Returns the boolean-valued attribute with the given name. Returns the given default value if
- * the attribute is undefined or the marker does not exist or is not a boolean value.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if no value is found
- * @return the value or the default value if no value was found.
- */
- public boolean getAttribute(String attributeName, boolean defaultValue);
-
- /**
- * Returns a map with all the attributes for the marker. If the marker has no attributes then
- * null
is returned.
- *
- * @return a map of attribute keys and values (key type : String
value type :
- * String
, Integer
, or Boolean
) or null
.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public Mapnull
- * or an instance of one of the following classes: String
, Integer
, or
- * Boolean
.
- *
- * @param attributeNames the names of the attributes
- * @return the values of the given attributes.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public Object[] getAttributes(String[] attributeNames) throws CoreException;
-
- /**
- * Returns the time at which this marker was created.
- *
- * @return the difference, measured in milliseconds, between the time at which this marker was
- * created and midnight, January 1, 1970 UTC, or 0L
if the creation time is not
- * known (this can occur in workspaces created using v2.0 or earlier).
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 2.1
- */
- public long getCreationTime() throws CoreException;
-
- /**
- * Returns the id of the marker. The id of a marker is unique relative to the resource with which
- * the marker is associated. Marker ids are not globally unique.
- *
- * @return the id of the marker
- * @see IResource#findMarker(long)
- */
- public long getId();
-
- /**
- * Returns the resource with which this marker is associated.
- *
- * @return the resource with which this marker is associated
- */
- public IResource getResource();
-
- /**
- * Returns the type of this marker. The returned marker type will not be null
.
- *
- * @return the type of this marker
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public String getType() throws CoreException;
-
- /**
- * Returns whether the type of this marker is considered to be a sub-type of the given marker
- * type.
- *
- * @return boolean true
if the marker's type is the same as (or a sub-type of) the
- * given type.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public boolean isSubtypeOf(String superType) throws CoreException;
-
- /**
- * Sets the integer-valued attribute with the given name.
- *
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void setAttribute(String attributeName, int value) throws CoreException;
-
- /**
- * Sets the attribute with the given name. The value must be IResourceChangeEvent
for more details.
- * null
or an instance of
- * one of the following classes: String
, Integer
, or Boolean
- *
. If the value is null
, the attribute is considered to be undefined.
- *
- * String
whose UTF encoding exceeds 65535 bytes. On
- * persistent markers this limit is enforced by an assertion.
- *
- * null
if the attribute is to be undefined
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void setAttribute(String attributeName, Object value) throws CoreException;
-
- /**
- * Sets the boolean-valued attribute with the given name.
- *
- * IResourceChangeEvent
for more details.
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void setAttribute(String attributeName, boolean value) throws CoreException;
-
- /**
- * Sets the given attribute key-value pairs on this marker. The values must be IResourceChangeEvent
for more details.
- * null
- * or an instance of one of the following classes: String
, Integer
, or
- * Boolean
. If a value is null
, the new value of the attribute is
- * considered to be undefined.
- *
- * String
whose UTF encoding exceeds 65535
- * bytes. On persistent markers this limit is enforced by an assertion.
- *
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void setAttributes(String[] attributeNames, Object[] values) throws CoreException;
-
- /**
- * Sets the attributes for this marker to be the ones contained in the given table. The values
- * must be an instance of one of the following classes: IResourceChangeEvent
for more details.
- * String
, Integer
,
- * or Boolean
. Attributes previously set on the marker but not included in the given
- * map are considered to be removals. Setting the given map to be null
is equivalent
- * to removing all marker attributes.
- *
- * String
whose UTF encoding exceeds 65535
- * bytes. On persistent markers this limit is enforced by an assertion.
- *
- * String
- * value type : String
, Integer
, or Boolean
) or
- * null
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void setAttributes(MapIResourceChangeEvent
for more details.
- * String
, Integer
, or Boolean
. Returns
- * null
if the attribute is undefined. The set of valid attribute names is defined
- * elsewhere.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @param attributeName the name of the attribute
- * @return the value, or null
if the attribute is undefined.
- */
- public Object getAttribute(String attributeName);
-
- /**
- * Returns the integer-valued attribute with the given name. Returns the given default value if
- * the attribute is undefined or is not an integer value.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if the attribute does not exist
- * @return the value or the default value if the attribute is undefined.
- */
- public int getAttribute(String attributeName, int defaultValue);
-
- /**
- * Returns the string-valued attribute with the given name. Returns the given default value if the
- * attribute is undefined or is not a string value.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if the attribute does not exist
- * @return the value or the default value if the attribute is undefined.
- */
- public String getAttribute(String attributeName, String defaultValue);
-
- /**
- * Returns the boolean-valued attribute with the given name. Returns the given default value if
- * the attribute is undefined or is not a boolean value.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @param attributeName the name of the attribute
- * @param defaultValue the value to use if the attribute does not exist
- * @return the value or the default value if the attribute is undefined.
- */
- public boolean getAttribute(String attributeName, boolean defaultValue);
-
- /**
- * Returns a Map with all the attributes for the marker. The result is a Map whose keys are
- * attributes names and whose values are attribute values. Each value an instance of one of the
- * following classes: String
, Integer
, or Boolean
. If the
- * marker has no attributes then null
is returned.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @return a map of attribute keys and values (key type : String
value type :
- * String
, Integer
, or Boolean
) or null
.
- */
- public Mapnull
or an
- * instance of one of the following classes: String
, Integer
, or
- * Boolean
.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @param attributeNames the names of the attributes
- * @return the values of the given attributes.
- */
- public Object[] getAttributes(String[] attributeNames);
-
- /**
- * Returns the id of the marker. The id of a marker is unique relative to the resource with which
- * the marker is associated. Marker ids are not globally unique.
- *
- * @return the id of the marker
- */
- public long getId();
-
- /**
- * Returns the kind of this marker delta: one of IResourceDelta.ADDED
,
- * IResourceDelta.REMOVED
, or IResourceDelta.CHANGED
.
- *
- * @return the kind of marker delta
- * @see IResourceDelta#ADDED
- * @see IResourceDelta#REMOVED
- * @see IResourceDelta#CHANGED
- */
- public int getKind();
-
- /**
- * Returns the marker described by this change. If kind is IResourceDelta.REMOVED
,
- * then this is the old marker, otherwise this is the new marker. Note that if the marker was
- * deleted, the value returned cannot be used to access attributes.
- *
- * @return the marker
- */
- public IMarker getMarker();
-
- /**
- * Returns the resource with which this marker is associated.
- *
- * @return the resource
- */
- public IResource getResource();
-
- /**
- * Returns the type of this marker.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @return the type of this marker
- */
- public String getType();
-
- /**
- * Returns whether the type of this marker is considered to be a sub-type of the given marker
- * type.
- *
- * IResourceDelta.ADDED
, then the information is from the new marker,
- * otherwise it is from the old marker.
- *
- * @return boolean true
if the marker's type is the same as (or a sub-type of) the
- * given type.
- */
- public boolean isSubtypeOf(String superType);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableChangeEvent.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableChangeEvent.java
deleted file mode 100644
index 45a0983652b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableChangeEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * VARIABLE_CHANGED
then
- * it is the new value, if the event type is VARIABLE_CREATED
then it is the new
- * value, or if the event type is VARIABLE_DELETED
then it will be null
.
- *
- * @return the variable's current value, or null
- */
- public IPath getValue();
-
- /**
- * Returns the affected variable's name.
- *
- * @return the affected variable's name
- */
- public String getVariableName();
-
- /**
- * Returns an object identifying the source of this event.
- *
- * @return an object identifying the source of this event
- * @see java.util.EventObject
- */
- public Object getSource();
-
- /**
- * Returns the type of event being reported.
- *
- * @return one of the event type constants
- * @see #VARIABLE_CHANGED
- * @see #VARIABLE_CREATED
- * @see #VARIABLE_DELETED
- */
- public int getType();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableChangeListener.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableChangeListener.java
deleted file mode 100644
index 1e90d19dfbf..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableChangeListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IPathVariableManager
object.
- *
- * @param event the path variable change event object describing which variable changed and how
- * @see IPathVariableManager#addChangeListener(IPathVariableChangeListener)
- * @see IPathVariableManager#removeChangeListener(IPathVariableChangeListener)
- * @see IPathVariableChangeEvent
- */
- public void pathVariableChanged(IPathVariableChangeEvent event);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableManager.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableManager.java
deleted file mode 100644
index 5d18a5a13c5..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IPathVariableManager.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IPath
object.
- *
- * null
for the nearest one.
- * @return The converted path
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 3.6
- */
- public URI convertToRelative(URI path, boolean force, String variableHint) throws CoreException;
-
- /**
- * Sets the path variable with the given name to be the specified value. Depending on the value
- * given and if the variable is currently defined or not, there are several possible outcomes for
- * this operation:
- *
- *
- *
- *
- * null
.
- * null
.
- * null
.
- * null
, or if it is defined but the given value is equal to
- * its current value.
- * null
)
- * @exception CoreException if this method fails. Reasons include:
- * @deprecated use setValue(String, URI) instead.
- *
- *
- */
- @Deprecated
- public void setValue(String name, IPath value) throws CoreException;
-
- /**
- * Sets the path variable with the given name to be the specified value. Depending on the value
- * given and if the variable is currently defined or not, there are several possible outcomes for
- * this operation:
- *
- *
- *
- *
- * null
.
- * null
.
- * null
.
- * null
, or if it is defined but the given value is equal to
- * its current value.
- * null
)
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 3.6
- */
- public void setURIValue(String name, URI value) throws CoreException;
-
- /**
- * Returns the value of the path variable with the given name. If there is no variable defined
- * with the given name, returns null
.
- *
- * @param name the name of the variable to return the value for
- * @return the value for the variable, or null
if there is no variable defined with
- * the given name
- * @deprecated use getURIValue(String) instead.
- */
- @Deprecated
- public IPath getValue(String name);
-
- /**
- * Returns the value of the path variable with the given name. If there is no variable defined
- * with the given name, returns null
.
- *
- * @param name the name of the variable to return the value for
- * @return the value for the variable, or null
if there is no variable defined with
- * the given name
- * @since 3.6
- */
- public URI getURIValue(String name);
-
- /**
- * Returns an array containing all defined path variable names.
- *
- * @return an array containing all defined path variable names
- */
- public String[] getPathVariableNames();
-
- // Should be added for 3.6
- // public String[] getPathVariableNames(String name);
-
- /**
- * Registers the given listener to receive notification of changes to path variables. The listener
- * will be notified whenever a variable has been added, removed or had its value changed. Has no
- * effect if an identical path variable change listener is already registered.
- *
- * @param listener the listener
- * @see IPathVariableChangeListener
- */
- public void addChangeListener(IPathVariableChangeListener listener);
-
- /**
- * Removes the given path variable change listener from the listeners list. Has no effect if an
- * identical listener is not registered.
- *
- * @param listener the listener
- * @see IPathVariableChangeListener
- */
- public void removeChangeListener(IPathVariableChangeListener listener);
-
- /**
- * Resolves a relative URI
object potentially containing a variable reference as its
- * first segment, replacing the variable reference (if any) with the variable's value (which is a
- * concrete absolute URI). If the given URI is absolute or has a non- null
device
- * then no variable substitution is done and that URI is returned as is. If the given URI is
- * relative and has a null
device, but the first segment does not correspond to a
- * defined variable, then the URI is returned as is.
- *
- * null
then null
will be returned. In all other
- * cases the result will be non-null
.
- *
- * @param uri the URI to be resolved
- * @return the resolved URI or null
- * @since 3.2
- */
- public URI resolveURI(URI uri);
-
- /**
- * Resolves a relative IPath
object potentially containing a variable reference as
- * its first segment, replacing the variable reference (if any) with the variable's value (which
- * is a concrete absolute path). If the given path is absolute or has a non- null
- * device then no variable substitution is done and that path is returned as is. If the given path
- * is relative and has a null
device, but the first segment does not correspond to a
- * defined variable, then the path is returned as is.
- *
- * null
then null
will be returned. In all other
- * cases the result will be non-null
.
- *
- *
- *
- *
- * null
- * @deprecated use resolveURI(URI) instead.
- */
- @Deprecated
- public IPath resolvePath(IPath path);
-
- /**
- * Returns true
if the given variable is defined and false
otherwise.
- * Returns false
if the given name is not a valid path variable name.
- *
- * @param name the variable's name
- * @return true
if the variable exists, false
otherwise
- */
- public boolean isDefined(String name);
-
- /**
- * Returns whether a variable is user defined or not.
- *
- * @return true if the path is user defined.
- * @since 3.6
- */
- public boolean isUserDefined(String name);
-
- /**
- * Validates the given name as the name for a path variable. A valid path variable name is made
- * exclusively of letters, digits and the underscore character, and does not start with a digit.
- *
- * @param name a possibly valid path variable name
- * @return a status object with code IStatus.OK
if the given name is a valid path
- * variable name, otherwise a status object indicating what is wrong with the string
- * @see IStatus#OK
- */
- public IStatus validateName(String name);
-
- /**
- * Validates the given path as the value for a path variable. A path variable value must be a
- * valid path that is absolute.
- *
- * @param path a possibly valid path variable value
- * @return a status object with code IStatus.OK
if the given path is a valid path
- * variable value, otherwise a status object indicating what is wrong with the value
- * @see IPath#isValidPath(String)
- * @see IStatus#OK
- */
- public IStatus validateValue(IPath path);
-
- /**
- * Validates the given path as the value for a path variable. A path variable value must be a
- * valid path that is absolute.
- *
- * @param path a possibly valid path variable value
- * @return a status object with code {@link IStatus#OK} if the given path is a valid path variable
- * value, otherwise a status object indicating what is wrong with the value
- * @see IPath#isValidPath(String)
- * @see IStatus#OK
- * @since 3.6
- */
- public IStatus validateValue(URI path);
-
- /**
- * Returns a variable relative path equivalent to an absolute path for a file or folder in the
- * file system, according to the variables defined in this project PathVariableManager. The file
- * or folder need not to exist.
- *
- * @param location a path in the local file system
- * @return the corresponding variable relative path, or null
if no such path is
- * available
- * @since 3.6
- */
- public URI getVariableRelativePathLocation(URI location);
-
- /**
- * Converts the internal format of the linked resource location if the PARENT variables is used.
- * For example, if the value is "${PARENT-2-VAR}\foo", the converted result is "${VAR}\..\..\foo".
- *
- * @param value the value encoded using OS string (as returned from Path.toOSString())
- * @param locationFormat indicates whether the value contains a string that is stored in the
- * linked resource location rather than in the path variable value
- * @return the converted path variable value
- * @since 3.6
- */
- public String convertToUserEditableFormat(String value, boolean locationFormat);
-
- /**
- * Converts the user editable format to the internal format. For example, if the value is
- * "${VAR}\..\..\foo", the converted result is "${PARENT-2-VAR}\foo". If the string is not
- * directly convertible to a ${PARENT-COUNT-VAR} syntax (for example, the editable string
- * "${FOO}bar\..\..\"), intermediate path variables will be created.
- *
- * @param value the value encoded using OS string (as returned from Path.toOSString())
- * @param locationFormat indicates whether the value contains a string that is stored in the
- * linked resource location rather than in the path variable value
- * @return the converted path variable value
- * @since 3.6
- */
- public String convertFromUserEditableFormat(String value, boolean locationFormat);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProject.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProject.java
deleted file mode 100644
index 891027874ad..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProject.java
+++ /dev/null
@@ -1,962 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- *
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IProject extends IContainer, IAdaptable {
- /**
- * Option constant (value 1) indicating that a snapshot to be loaded or saved contains a resource
- * tree (refresh information).
- *
- * @see #loadSnapshot(int, URI, IProgressMonitor)
- * @see #saveSnapshot(int, URI, IProgressMonitor)
- * @since 3.6
- */
- public static final int SNAPSHOT_TREE = 1;
-
- /**
- * Invokes the build
method of the specified builder for this project. Does nothing
- * if this project is closed. If this project has multiple builders on its build spec matching the
- * given name, only the first matching builder will be run. The build is run for the project's
- * active build configuration.
- *
- *
- * org.eclipse.core.resources.builders
extension point. The arguments are builder specific.
- *
- *
- *
- *
- * @param builderName the name of the builder
- * @param args a table of builder-specific arguments keyed by argument name (key type:
- * String
, value type: String
); null
is equivalent to an
- * empty map
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if the build fails. The status contained in the exception may be a
- * generic {@link IResourceStatus#BUILD_FAILED} code, but it could also be any other status
- * code; it might also be a {@link MultiStatus}.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IProjectDescription
- * @see IncrementalProjectBuilder#build(int, Map, IProgressMonitor)
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IncrementalProjectBuilder#CLEAN_BUILD
- * @see IResourceRuleFactory#buildRule()
- */
- public void build(
- int kind, String builderName, Map
- *
- *
- * @param monitor a progress monitor, or IncrementalProjectBuilder.FULL_BUILD
- indicates a full build.
- * IncrementalProjectBuilder.INCREMENTAL_BUILD
- indicates an incremental
- * build.
- * CLEAN_BUILD
- indicates a clean request. Clean does not actually build
- * anything, but rather discards all problems and build states.
- * null
if progress reporting is not desired
- * @exception CoreException if the build fails. The status contained in the exception may be a
- * generic BUILD_FAILED
code, but it could also be any other status code; it
- * might also be a multi-status.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IProjectDescription
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IResourceRuleFactory#buildRule()
- */
- public void build(int kind, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Builds a specific build configuration of this project. Does nothing if the project is closed or
- * the build configuration does not exist.
- *
- *
- *
- *
- * @param monitor a progress monitor, or IncrementalProjectBuilder.FULL_BUILD
- indicates a full build.
- * IncrementalProjectBuilder.INCREMENTAL_BUILD
- indicates an incremental
- * build.
- * CLEAN_BUILD
- indicates a clean request. Clean does not actually build
- * anything, but rather discards all problems and build states.
- * null
if progress reporting is not desired
- * @exception CoreException if the build fails. The status contained in the exception may be a
- * generic BUILD_FAILED
code, but it could also be any other status code; it
- * might also be a multi-status.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IProjectDescription
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IResourceRuleFactory#buildRule()
- * @since 3.7
- */
- public void build(IBuildConfiguration config, int kind, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Closes this project. The project need not be open. Closing a closed project does nothing.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #open(IProgressMonitor)
- * @see #isOpen()
- * @see IResourceRuleFactory#modifyRule(IResource)
- */
- public void close(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Creates a new project resource in the workspace using the given project description. Upon
- * successful completion, the project will exist but be closed.
- *
- * IResourceChangeEvent
for more details.
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IWorkspace#validateProjectLocation(IProject, IPath)
- * @see IResourceRuleFactory#createRule(IResource)
- */
- public void create(IProjectDescription description, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates a new project resource in the workspace with files in the default location in the local
- * file system. Upon successful completion, the project will exist but be closed.
- *
- * IWorkspace.validateName
- *
).
- *
- * IWorkspace.validateProjectLocation
).
- * IResourceChangeEvent
for more details.
- *
- *
- *
- * If there is an existing project description file, it is not overwritten.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IWorkspace#validateProjectLocation(IProject, IPath)
- * @see IResourceRuleFactory#createRule(IResource)
- */
- public void create(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Creates a new project resource in the workspace using the given project description. Upon
- * successful completion, the project will exist but be closed.
- *
- * IWorkspace.validateName
- *
).
- *
- * IWorkspace.validateProjectLocation
).
- * IResourceChangeEvent
for more details.
- * true
immediately after creating the
- * resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IWorkspace#validateProjectLocation(IProject, IPath)
- * @see IResourceRuleFactory#createRule(IResource)
- * @since 3.4
- */
- public void create(IProjectDescription description, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Deletes this project from the workspace. No action is taken if this project does not exist.
- *
- * IWorkspace.validateName
- *
).
- *
- * IWorkspace.validateProjectLocation
).
- * IResourceChangeEvent
for more details.
- *
- * delete(
- * (deleteContent ? IResource.ALWAYS_DELETE_PROJECT_CONTENT : IResource.NEVER_DELETE_PROJECT_CONTENT )
- * | (force ? FORCE : IResource.NONE),
- * monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#delete(int, IProgressMonitor)
- * @see #open(IProgressMonitor)
- * @see #close(IProgressMonitor)
- * @see IResource#delete(int,IProgressMonitor)
- * @see IResourceRuleFactory#deleteRule(IResource)
- */
- public void delete(boolean deleteContent, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns the active build configuration for the project.
- *
- * IResourceChangeEvent
for more details.
- *
- *
- *
- * @since 3.7
- */
- public IBuildConfiguration getActiveBuildConfig() throws CoreException;
-
- /**
- * Returns the project {@link IBuildConfiguration} with the given name for this project.
- *
- * @param configName the name of the configuration to get
- * @return a project configuration
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getBuildConfigs()
- * @since 3.7
- */
- public IBuildConfiguration getBuildConfig(String configName) throws CoreException;
-
- /**
- * Returns the build configurations for this project. A project always has at least one build
- * configuration, so this will never return an empty list or null. The result will not contain
- * duplicates.
- *
- * @return a list of project build configurations
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 3.7
- */
- public IBuildConfiguration[] getBuildConfigs() throws CoreException;
-
- /**
- * Returns this project's content type matcher. This content type matcher takes project specific
- * preferences and nature-content type associations into account.
- *
- * @return the content type matcher for this project
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IContentTypeMatcher
- * @since 3.1
- */
- public IContentTypeMatcher getContentTypeMatcher() throws CoreException;
-
- /**
- * Returns the description for this project. The returned value is a copy and cannot be used to
- * modify this project. The returned value is suitable for use in creating, copying and moving
- * other projects.
- *
- * @return the description for this project
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #create(IProgressMonitor)
- * @see #create(IProjectDescription, IProgressMonitor)
- * @see IResource#copy(IProjectDescription, int, IProgressMonitor)
- * @see #move(IProjectDescription, boolean, IProgressMonitor)
- */
- public IProjectDescription getDescription() throws CoreException;
-
- /**
- * Returns a handle to the file with the given name in this project.
- *
- * null
if the project
- * nature has not been added to this project. Clients may downcast to a more concrete type for
- * more nature-specific methods. The documentation for a project nature specifies any such
- * additional protocol.
- *
- *
- * "com.example.acmeplugin.coolnature"
)
- * @return the project nature object
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public IProjectNature getNature(String natureId) throws CoreException;
-
- /**
- * Returns the location in the local file system of the project-specific working data area for use
- * by the given plug-in or null
if the project does not exist.
- *
- * IProject.getWorkingLocation(plugin.getUniqueIdentifier())
.
- */
- @Deprecated
- public IPath getPluginWorkingLocation(IPluginDescriptor plugin);
-
- /**
- * Returns the location in the local file system of the project-specific working data area for use
- * by the bundle/plug-in with the given identifier, or null
if the project does not
- * exist.
- *
- *
- *
- *
- * @see #getReferencedBuildConfigs(String, boolean)
- * @see IProjectDescription#getReferencedProjects()
- * @see IProjectDescription#getDynamicReferences()
- */
- public IProject[] getReferencedProjects() throws CoreException;
-
- /**
- * Returns the list of all open projects which reference this project. This project may or may not
- * exist. Returns an empty array if there are no referencing projects.
- *
- * @return a list of open projects referencing this project
- */
- public IProject[] getReferencingProjects();
-
- /**
- * Returns the build configurations referenced by the passed in build configuration on this
- * project.
- *
- *
- *
- *
- * @see IProjectDescription#getBuildConfigReferences(String)
- * @since 3.7
- */
- public IBuildConfiguration[] getReferencedBuildConfigs(String configName, boolean includeMissing)
- throws CoreException;
-
- /**
- * Checks whether the project has the specified build configuration.
- *
- * @param configName the configuration
- * @return true
if the project has the specified configuration, false otherwise
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 3.7
- */
- public boolean hasBuildConfig(String configName) throws CoreException;
-
- /**
- * Returns whether the project nature specified by the given nature extension id has been added to
- * this project.
- *
- * @param natureId the nature extension identifier
- * @return true
if the project has the given nature
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public boolean hasNature(String natureId) throws CoreException;
-
- /**
- * Returns true if the project nature specified by the given nature extension id is enabled for
- * this project, and false otherwise.
- *
- *
- * Reasons for a nature not to be enabled include:
- *
- *
- * @param natureId the nature extension identifier
- * @return true
if the given nature is enabled for this project
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 2.0
- * @see IWorkspace#validateNatureSet(String[])
- */
- public boolean isNatureEnabled(String natureId) throws CoreException;
-
- /**
- * Returns whether this project is open.
- *
- * true
if this project is open, false
if this project is closed
- * or does not exist
- * @see #open(IProgressMonitor)
- * @see #close(IProgressMonitor)
- */
- public boolean isOpen();
-
- /**
- * Loads a snapshot of project meta-data from the given location URI. Must be called after the
- * project has been created, but before it is opened. The options constant controls what kind of
- * snapshot information to load. Valid option values include:
- *
- *
- *
- *
- * @param options kind of snapshot information to load
- * @param snapshotLocation URI to load from
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled.
- * @see #saveSnapshot(int, URI, IProgressMonitor)
- * @since 3.6
- */
- public void loadSnapshot(int options, URI snapshotLocation, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Renames this project so that it is located at the name in the given description.
- *
- *
- * move(description, (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceDelta#getFlags()
- * @see IResource#move(IProjectDescription,int,IProgressMonitor)
- * @see IResourceRuleFactory#moveRule(IResource, IResource)
- */
- public void move(IProjectDescription description, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Opens this project. No action is taken if the project is already open.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- *
- *
- *
- * This method changes resources; these changes will be reported in a subsequent resource change
- * event that includes an indication that the project has been opened and its resources have been
- * added to the tree. If the BACKGROUND_REFRESH
update flag is specified, multiple
- * resource change events may occur as resources on disk are discovered and added to the tree.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #close(IProgressMonitor)
- * @see IResource#BACKGROUND_REFRESH
- * @see IResourceRuleFactory#modifyRule(IResource)
- * @since 3.1
- */
- public void open(int updateFlags, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Opens this project. No action is taken if the project is already open.
- *
- * IResourceChangeEvent
for more details.
- * open(IResource.NONE, monitor)
- * .
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #close(IProgressMonitor)
- * @see IResourceRuleFactory#modifyRule(IResource)
- */
- public void open(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Writes a snapshot of project meta-data into the given location URI. The options constant
- * controls what kind of snapshot information to write. Valid option values include:
- *
- * IResourceChangeEvent
for more details.
- *
- *
- *
- * @param options kind of snapshot information to save
- * @param snapshotLocation URI for saving the snapshot to
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled.
- * @see #loadSnapshot(int, URI, IProgressMonitor)
- * @since 3.6
- */
- public void saveSnapshot(int options, URI snapshotLocation, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Changes this project resource to match the given project description. This project should exist
- * and be open.
- *
- *
- * setDescription(description, KEEP_HISTORY, monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #getDescription()
- * @see IProjectNature#configure()
- * @see IProjectNature#deconfigure()
- * @see #setDescription(IProjectDescription,int,IProgressMonitor)
- */
- public void setDescription(IProjectDescription description, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Changes this project resource to match the given project description. This project should exist
- * and be open.
- *
- * IResourceChangeEvent
for more details.
- * getNature
- * for the specified nature id. Similarly, any natures the project had which are no longer
- * required will be automatically de-configured by calling {@link IProjectNature#deconfigure} on
- * the nature object and letting go of the internal reference to it.
- *
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to overwrite the project's description file in the
- * local file system provided it is in sync with the workspace. This option ensures there is no
- * unintended data loss; it is the recommended setting. However, if FORCE
is
- * specified, an attempt will be made to write the project description file in the local file
- * system, overwriting any existing one if need be.
- *
- * KEEP_HISTORY
update flag controls whether or not a copy of current contents
- * of the project description file should be captured in the workspace's local history. The local
- * history mechanism serves as a safety net to help the user recover from mistakes that might
- * otherwise result in data loss. Specifying KEEP_HISTORY
is recommended. Note that
- * local history is maintained with each individual project, and gets discarded when a project is
- * deleted from the workspace.
- *
- * AVOID_NATURE_CONFIG
update flag controls whether or not added and removed
- * natures should be configured or de-configured. If this flag is not specified, then added
- * natures will be configured and removed natures will be de-configured. If this flag is
- * specified, natures can still be added or removed, but they will not be configured or
- * de-configured.
- *
- * AVOID_NATURE_CONFIG
- *
flag. If the flag is specified the {@link IResourceRuleFactory#modifyRule} is required;
- * If the flag is not specified, the {@link IWorkspaceRoot} scheduling rule is required.
- *
- * FORCE
, KEEP_HISTORY
, and
- * AVOID_NATURE_CONFIG
are ignored.
- *
- * IFileModificationValidator.validateSave
on the
- * project description file. If the validation fails, then this operation will fail.
- *
- * FORCE
, KEEP_HISTORY
- *
and AVOID_NATURE_CONFIG
)
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #getDescription()
- * @see IProjectNature#configure()
- * @see IProjectNature#deconfigure()
- * @see IResource#FORCE
- * @see IResource#KEEP_HISTORY
- * @see IResource#AVOID_NATURE_CONFIG
- * @see IResourceRuleFactory#modifyRule(IResource)
- * @since 2.0
- */
- public void setDescription(
- IProjectDescription description, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectDescription.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectDescription.java
deleted file mode 100644
index dedb9d6a0ae..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectDescription.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * ".project"
).
- * The handle of a project's description file is project.getFile(DESCRIPTION_FILE_NAME)
- *
. The project description file is located in the root of the project's content area.
- *
- * @since 2.0
- */
- public static final String DESCRIPTION_FILE_NAME = ".project"; // $NON-NLS-1$
-
- /**
- * Returns the build configurations referenced by the specified configuration for the described
- * project.
- *
- * null
is returned if the default location should be used. This
- * method will return null
if this project is not located in the local file system.
- *
- * @return the location for the described project or null
- * @deprecated Since 3.2, project locations are not necessarily in the local file system. The more
- * general {@link #getLocationURI()} method should be used instead.
- */
- @Deprecated
- public IPath getLocation();
-
- /**
- * Returns the location URI for the described project. null
is returned if the
- * default location should be used.
- *
- * @return the location for the described project or null
- * @since 3.2
- * @see #setLocationURI(URI)
- */
- public URI getLocationURI();
-
- /**
- * Returns the name of the described project.
- *
- * @return the name of the described project
- */
- public String getName();
-
- /**
- * Returns the list of natures associated with the described project. Returns an empty array if
- * there are no natures on this description.
- *
- * @return the list of natures for the described project
- * @see #setNatureIds(String[])
- */
- public String[] getNatureIds();
-
- /**
- * Returns the projects referenced by the described project. These references are persisted in the
- * project description file (".project") and as such will be shared whenever the project
- * is exported to another workspace. For references that are likely to change from one workspace
- * to another, dynamic references should be used instead.
- *
- * true
if the described project has the given nature
- */
- public boolean hasNature(String natureId);
-
- /**
- * Returns a new build command.
- *
- * setBuildSpec
method.
- *
- * @return a new command
- * @see #setBuildSpec(ICommand[])
- */
- public ICommand newCommand();
-
- /**
- * Sets the active configuration for the described project.
- *
- *
- * null
configuration name is resolved to the active build configuration on use. Duplicates
- * will be removed. The order of the referenced build configurations is preserved. If the given
- * configuration does not exist in this description then this has no effect.
- *
- * null
is specified, the default location is used.
- *
- * copy
and move
.
- *
- * null
- * @see #getLocation()
- */
- public void setLocation(IPath location);
-
- /**
- * Sets the location for the described project. If null
is specified, the default
- * location is used.
- *
- * copy
and move
.
- *
- * null
- * @see #getLocationURI()
- * @see IWorkspace#validateProjectLocationURI(IProject, URI)
- * @since 3.2
- */
- public void setLocationURI(URI location);
-
- /**
- * Sets the name of the described project.
- *
- * IProject.setDescription
and should not be called directly by
- * clients. The nature extension id is added to the list of natures before this method is called,
- * and need not be added here.
- *
- *
- * IProject.setDescription
, but the nature will remain in the project description.
- *
- * @exception CoreException if this method fails.
- */
- public void configure() throws CoreException;
-
- /**
- * De-configures this nature for its project. This is called by the workspace when natures are
- * removed from the project using IProject.setDescription
and should not be called
- * directly by clients. The nature extension id is removed from the list of natures before this
- * method is called, and need not be removed here.
- *
- *
- * IProject.setDescription
, but the nature will still be removed from the project
- * description. *
- *
- * @exception CoreException if this method fails.
- */
- public void deconfigure() throws CoreException;
-
- /**
- * Returns the project to which this project nature applies.
- *
- * @return the project handle
- */
- public IProject getProject();
-
- /**
- * Sets the project to which this nature applies. Used when instantiating this project nature
- * runtime. This is called by IProject.create()
or IProject.setDescription()
- *
and should not be called directly by clients.
- *
- * @param project the project to which this nature applies
- */
- public void setProject(IProject project);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectNatureDescriptor.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectNatureDescriptor.java
deleted file mode 100644
index 939800e6cb2..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IProjectNatureDescriptor.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * plugin.xml
) file.
- *
- *
- * IProjectNature
) generally runs plug-in-defined code.
- *
- * @see IProjectNature
- * @see IWorkspace#getNatureDescriptor(String)
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IProjectNatureDescriptor {
- /**
- * Returns the unique identifier of this nature.
- *
- * "com.xyz"
defines a nature extension with id
- * "myNature"
, the unique nature identifier will be "com.xyz.myNature"
.
- *
- * @return the unique nature identifier
- */
- public String getNatureId();
-
- /**
- * Returns a displayable label for this nature. Returns the empty string if no label for this
- * nature is specified in the plug-in manifest file.
- *
- * "requires-nature"
element on a nature extension. Returns an empty
- * array if no natures are required by this nature.
- *
- * @return an array of nature ids that this nature requires, possibly an empty array.
- */
- public String[] getRequiredNatureIds();
-
- /**
- * Returns the identifiers of the nature sets that this nature belongs to. Nature set inclusion is
- * specified by the "one-of-nature"
element on a nature extension. Returns an empty
- * array if no nature sets are specified for this nature.
- *
- * @return an array of nature set ids that this nature belongs to, possibly an empty array.
- */
- public String[] getNatureSetIds();
-
- /**
- * Returns whether this project nature allows linked resources to be created in projects where
- * this nature is installed.
- *
- * @return boolean true
if creating links is allowed, and false
- * otherwise.
- * @see IFolder#createLink(org.eclipse.core.runtime.IPath, int,
- * org.eclipse.core.runtime.IProgressMonitor)
- * @see IFile#createLink(org.eclipse.core.runtime.IPath, int,
- * org.eclipse.core.runtime.IProgressMonitor)
- * @since 2.1
- */
- public boolean isLinkingAllowed();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResource.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResource.java
deleted file mode 100644
index 43b416274c1..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResource.java
+++ /dev/null
@@ -1,2481 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- *
- *
- * IResource
objects are handles to state maintained by a workspace. That
- * is, resource objects do not actually contain data themselves but rather represent resource
- * state and give it behavior. Programmers are free to manipulate handles for resources that
- * do not exist in a workspace but must keep in mind that some methods and operations require
- * that an actual resource be available.
- *
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see IWorkspace
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResource extends IAdaptable, ISchedulingRule {
-
- /*====================================================================
- * Constants defining resource types: There are four possible resource types
- * and their type constants are in the integer range 1 to 8 as defined below.
- *====================================================================*/
-
- /**
- * Type constant (bit mask value 1) which identifies file resources.
- *
- * @see IResource#getType()
- * @see IFile
- */
- public static final int FILE = 0x1;
-
- /**
- * Type constant (bit mask value 2) which identifies folder resources.
- *
- * @see IResource#getType()
- * @see IFolder
- */
- public static final int FOLDER = 0x2;
-
- /**
- * Type constant (bit mask value 4) which identifies project resources.
- *
- * @see IResource#getType()
- * @see IProject
- */
- public static final int PROJECT = 0x4;
-
- /**
- * Type constant (bit mask value 8) which identifies the root resource.
- *
- * @see IResource#getType()
- * @see IWorkspaceRoot
- */
- public static final int ROOT = 0x8;
-
- /*====================================================================
- * Constants defining the depth of resource tree traversal:
- *====================================================================*/
-
- /** Depth constant (value 0) indicating this resource, but not any of its members. */
- public static final int DEPTH_ZERO = 0;
-
- /** Depth constant (value 1) indicating this resource and its direct members. */
- public static final int DEPTH_ONE = 1;
-
- /**
- * Depth constant (value 2) indicating this resource and its direct and indirect members at any
- * depth.
- */
- public static final int DEPTH_INFINITE = 2;
-
- /*====================================================================
- * Constants for update flags for delete, move, copy, open, etc.:
- *====================================================================*/
-
- /**
- * Update flag constant (bit mask value 1) indicating that the operation should proceed even if
- * the resource is out of sync with the local file system.
- *
- * @since 2.0
- */
- public static final int FORCE = 0x1;
-
- /**
- * Update flag constant (bit mask value 2) indicating that the operation should maintain local
- * history by taking snapshots of the contents of files just before being overwritten or deleted.
- *
- * @see IFile#getHistory(IProgressMonitor)
- * @since 2.0
- */
- public static final int KEEP_HISTORY = 0x2;
-
- /**
- * Update flag constant (bit mask value 4) indicating that the operation should delete the files
- * and folders of a project.
- *
- *
- * ALWAYS_DELETE_PROJECT_CONTENT
indicates that the contents of a project are to be deleted
- * regardless of whether the project is open or closed at the time; specifying
- * NEVER_DELETE_PROJECT_CONTENT
indicates that the contents of a project are to be retained
- * regardless of whether the project is open or closed at the time.
- *
- * @see #NEVER_DELETE_PROJECT_CONTENT
- * @since 2.0
- */
- public static final int ALWAYS_DELETE_PROJECT_CONTENT = 0x4;
-
- /**
- * Update flag constant (bit mask value 8) indicating that the operation should preserve the files
- * and folders of a project.
- *
- *
- * ALWAYS_DELETE_PROJECT_CONTENT
indicates that the contents of a project are to be deleted
- * regardless of whether the project is open or closed at the time; specifying
- * NEVER_DELETE_PROJECT_CONTENT
indicates that the contents of a project are to be retained
- * regardless of whether the project is open or closed at the time.
- *
- * @see #ALWAYS_DELETE_PROJECT_CONTENT
- * @since 2.0
- */
- public static final int NEVER_DELETE_PROJECT_CONTENT = 0x8;
-
- /**
- * Update flag constant (bit mask value 16) indicating that the link creation should proceed even
- * if the local file system file or directory is missing.
- *
- * @see IFolder#createLink(IPath, int, IProgressMonitor)
- * @see IFile#createLink(IPath, int, IProgressMonitor)
- * @since 2.1
- */
- public static final int ALLOW_MISSING_LOCAL = 0x10;
-
- /**
- * Update flag constant (bit mask value 32) indicating that a copy or move operation should only
- * copy the link, rather than copy the underlying contents of the linked resource.
- *
- * @see #copy(IPath, int, IProgressMonitor)
- * @see #move(IPath, int, IProgressMonitor)
- * @since 2.1
- */
- public static final int SHALLOW = 0x20;
-
- /**
- * Update flag constant (bit mask value 64) indicating that setting the project description should
- * not attempt to configure and de-configure natures.
- *
- * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
- * @since 3.0
- */
- public static final int AVOID_NATURE_CONFIG = 0x40;
-
- /**
- * Update flag constant (bit mask value 128) indicating that opening a project for the first time
- * or creating a linked folder should refresh in the background.
- *
- * @see IProject#open(int, IProgressMonitor)
- * @see IFolder#createLink(URI, int, IProgressMonitor)
- * @since 3.1
- */
- public static final int BACKGROUND_REFRESH = 0x80;
-
- /**
- * Update flag constant (bit mask value 256) indicating that a resource should be replaced with a
- * resource of the same name at a different file system location.
- *
- * @see IFile#createLink(URI, int, IProgressMonitor)
- * @see IFolder#createLink(URI, int, IProgressMonitor)
- * @see IResource#move(IProjectDescription, int, IProgressMonitor)
- * @since 3.2
- */
- public static final int REPLACE = 0x100;
-
- /**
- * Update flag constant (bit mask value 512) indicating that ancestor resources of the target
- * resource should be checked.
- *
- * @see IResource#isLinked(int)
- * @since 3.2
- */
- public static final int CHECK_ANCESTORS = 0x200;
-
- /**
- * Update flag constant (bit mask value 0x400) indicating that a resource should be marked as
- * derived.
- *
- * @see IFile#create(java.io.InputStream, int, IProgressMonitor)
- * @see IFolder#create(int, boolean, IProgressMonitor)
- * @see IResource#setDerived(boolean)
- * @since 3.2
- */
- public static final int DERIVED = 0x400;
-
- /**
- * Update flag constant (bit mask value 0x800) indicating that a resource should be marked as team
- * private.
- *
- * @see IFile#create(java.io.InputStream, int, IProgressMonitor)
- * @see IFolder#create(int, boolean, IProgressMonitor)
- * @see IResource#copy(IPath, int, IProgressMonitor)
- * @see IResource#setTeamPrivateMember(boolean)
- * @since 3.2
- */
- public static final int TEAM_PRIVATE = 0x800;
-
- /**
- * Update flag constant (bit mask value 0x1000) indicating that a resource should be marked as a
- * hidden resource.
- *
- * @since 3.4
- */
- public static final int HIDDEN = 0x1000;
-
- /**
- * Update flag constant (bit mask value 0x2000) indicating that a resource should be marked as a
- * virtual resource.
- *
- * @see IFolder#create(int, boolean, IProgressMonitor)
- * @since 3.6
- */
- public static final int VIRTUAL = 0x2000;
-
- /*====================================================================
- * Other constants:
- *====================================================================*/
-
- /**
- * Modification stamp constant (value -1) indicating no modification stamp is available.
- *
- * @see #getModificationStamp()
- */
- public static final int NULL_STAMP = -1;
-
- /**
- * General purpose zero-valued bit mask constant. Useful whenever you need to supply a bit mask
- * with no bits set.
- *
- *
- *
- *
- * @since 2.0
- */
- public static final int NONE = 0;
-
- /**
- * Accepts the given visitor for an optimized traversal. The visitor's
- * delete(IResource.NONE, null)
- *
- * visit
method
- * is called, and is provided with a proxy to this resource. The proxy is a transient object that
- * can be queried very quickly for information about the resource. If the actual resource handle
- * is needed, it can be obtained from the proxy. Requesting the resource handle, or the full path
- * of the resource, will degrade performance of the visit.
- *
- * false
from its visit
method.
- *
- *
- * accept(visitor, IResource.DEPTH_INFINITE, memberFlags)
.
- *
- * visit
method is called. If
- * the {@link IContainer#DO_NOT_CHECK_EXISTENCE} flag is specified in the member flags, the
- * resource is not checked for existence before the visitor's visit
method is called.
- * Children of the resource are never checked for existence.
- *
- * @param visitor the visitor
- * @param memberFlags bit-wise or of member flag constants ({@link IContainer#INCLUDE_PHANTOMS},
- * {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} and {@link IContainer#INCLUDE_HIDDEN})
- * indicating which members are of interest and {@link IContainer#DO_NOT_CHECK_EXISTENCE} if
- * the resource on which the method is called should not be checked for existence
- * @exception CoreException if this request fails. Reasons include:
- *
- *
- *
- * @see IContainer#INCLUDE_PHANTOMS
- * @see IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS
- * @see IContainer#INCLUDE_HIDDEN
- * @see IContainer#DO_NOT_CHECK_EXISTENCE
- * @see IResource#isPhantom()
- * @see IResource#isTeamPrivateMember()
- * @see IResourceProxyVisitor#visit(IResourceProxy)
- * @since 2.1
- */
- public void accept(IResourceProxyVisitor visitor, int memberFlags) throws CoreException;
-
- /**
- * Accepts the given visitor for an optimized traversal. The visitor's visit
method
- * is called, and is provided with a proxy to this resource. The proxy is a transient object that
- * can be queried very quickly for information about the resource. If the actual resource handle
- * is needed, it can be obtained from the proxy. Requesting the resource handle, or the full path
- * of the resource, will degrade performance of the visit.
- *
- * false
from its visit
method.
- *
- * visit
method is called. If
- * the {@link IContainer#DO_NOT_CHECK_EXISTENCE} flag is specified in the member flags, the
- * resource is not checked for existence before the visitor's visit
method is called.
- * Children of the resource are never checked for existence.
- *
- * @param visitor the visitor
- * @param depth the depth to which members of this resource should be visited. One of {@link
- * IResource#DEPTH_ZERO}, {@link IResource#DEPTH_ONE}, or {@link IResource#DEPTH_INFINITE}.
- * @param memberFlags bit-wise or of member flag constants ({@link IContainer#INCLUDE_PHANTOMS},
- * {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS} and {@link IContainer#INCLUDE_HIDDEN})
- * indicating which members are of interest and {@link IContainer#DO_NOT_CHECK_EXISTENCE} if
- * the resource on which the method is called should not be checked for existence
- * @exception CoreException if this request fails. Reasons include:
- *
- *
- *
- * @see IContainer#INCLUDE_PHANTOMS
- * @see IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS
- * @see IContainer#INCLUDE_HIDDEN
- * @see IContainer#DO_NOT_CHECK_EXISTENCE
- * @see IResource#isPhantom()
- * @see IResource#isTeamPrivateMember()
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @see IResourceProxyVisitor#visit(IResourceProxy)
- * @since 3.8
- */
- public void accept(IResourceProxyVisitor visitor, int depth, int memberFlags)
- throws CoreException;
-
- /**
- * Accepts the given visitor. The visitor's visit
method is called with this
- * resource. If the visitor returns true
, this method visits this resource's members.
- *
- *
- * accept(visitor, IResource.DEPTH_INFINITE, IResource.NONE)
.
- *
- * @param visitor the visitor
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResourceVisitor#visit(IResource)
- * @see #accept(IResourceVisitor,int,int)
- */
- public void accept(IResourceVisitor visitor) throws CoreException;
-
- /**
- * Accepts the given visitor. The visitor's visit
method is called with this
- * resource. If the visitor returns false
, this resource's members are not visited.
- *
- *
- * accept(visitor, depth, includePhantoms ? IContainer.INCLUDE_PHANTOMS : IResource.NONE);
- *
- *
- * @param visitor the visitor
- * @param depth the depth to which members of this resource should be visited. One of {@link
- * IResource#DEPTH_ZERO}, {@link IResource#DEPTH_ONE}, or {@link IResource#DEPTH_INFINITE}.
- * @param includePhantoms true
if phantom resources are of interest; false
- *
if phantom resources are not of interest.
- * @exception CoreException if this request fails. Reasons include:
- *
- *
- *
- * @see IResource#isPhantom()
- * @see IResourceVisitor#visit(IResource)
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @see IResource#accept(IResourceVisitor,int,int)
- */
- public void accept(IResourceVisitor visitor, int depth, boolean includePhantoms)
- throws CoreException;
-
- /**
- * Accepts the given visitor. The visitor's includePhantoms
is false
and this resource does not exist.
- * includePhantoms
is true
and this resource does not exist
- * and is not a phantom.
- * visit
method is called with this
- * resource. If the visitor returns false
, this resource's members are not visited.
- *
- * visit
method is called. If
- * the {@link IContainer#DO_NOT_CHECK_EXISTENCE} flag is specified in the member flags, the
- * resource is not checked for existence before the visitor's visit
method is called.
- * Children of the resource are never checked for existence.
- *
- * @param visitor the visitor
- * @param depth the depth to which members of this resource should be visited. One of {@link
- * IResource#DEPTH_ZERO}, {@link IResource#DEPTH_ONE}, or {@link IResource#DEPTH_INFINITE}.
- * @param memberFlags bit-wise or of member flag constants ({@link IContainer#INCLUDE_PHANTOMS},
- * {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS}, {@link IContainer#INCLUDE_HIDDEN} and
- * {@link IContainer#EXCLUDE_DERIVED}) indicating which members are of interest and {@link
- * IContainer#DO_NOT_CHECK_EXISTENCE} if the resource on which the method is called should not
- * be checked for existence
- * @exception CoreException if this request fails. Reasons include:
- *
- *
- *
- * @see IContainer#INCLUDE_PHANTOMS
- * @see IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS
- * @see IContainer#INCLUDE_HIDDEN
- * @see IContainer#EXCLUDE_DERIVED
- * @see IContainer#DO_NOT_CHECK_EXISTENCE
- * @see IResource#isDerived()
- * @see IResource#isPhantom()
- * @see IResource#isTeamPrivateMember()
- * @see IResource#isHidden()
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @see IResourceVisitor#visit(IResource)
- * @since 2.0
- */
- public void accept(IResourceVisitor visitor, int depth, int memberFlags) throws CoreException;
-
- /**
- * Removes the local history of this resource and its descendents.
- *
- * null
if progress reporting and cancellation
- * are not desired
- */
- public void clearHistory(IProgressMonitor monitor) throws CoreException;
-
- /**
- * Makes a copy of this resource at the given path.
- *
- *
- * copy(destination, (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be copied. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- */
- public void copy(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Makes a copy of this resource at the given path. The resource's descendents are copied as well.
- * The path of this resource must not be a prefix of the destination path. The workspace root may
- * not be the source or destination location of a copy operation, and a project can only be copied
- * to another project. After successful completion, corresponding new resources will exist at the
- * given path; their contents and properties will be copies of the originals. The original
- * resources are not affected.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- *
- * copy(workspace.newProjectDescription(folder.getName()),updateFlags,monitor);
- *
- *
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to copy resources that are in sync with the
- * corresponding files and directories in the local file system; it will fail if it encounters a
- * resource that is out of sync with the file system. However, if FORCE
is specified,
- * the method copies all corresponding files and directories from the local file system, including
- * ones that have been recently updated or created. Note that in both settings of the FORCE
- *
flag, the operation fails if the newly created resources in the workspace would be out
- * of sync with the local file system; this ensures files in the file system cannot be
- * accidentally overwritten.
- *
- * SHALLOW
update flag controls how this method deals with linked resources.
- * If SHALLOW
is not specified, then the underlying contents of the linked resource
- * will always be copied in the file system. In this case, the destination of the copy will never
- * be a linked resource or contain any linked resources. If SHALLOW
is specified when
- * a linked resource is copied into another project, a new linked resource is created in the
- * destination project that points to the same file system location. When a project containing
- * linked resources is copied, the new project will contain the same linked resources pointing to
- * the same file system locations. For both of these shallow cases, no files on disk under the
- * linked resource are actually copied. With the SHALLOW
flag, copying of linked
- * resources into anything other than a project is not permitted. The SHALLOW
update
- * flag is ignored when copying non- linked resources.
- *
- * true
immediately after creating the
- * resource.
- *
- * true
immediately after creating
- * the resource.
- *
- * true
immediately after creating the resource.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be copied. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancellation can occur even
- * if no progress monitor is provided.
- * @see #FORCE
- * @see #SHALLOW
- * @see #DERIVED
- * @see #TEAM_PRIVATE
- * @see IResourceRuleFactory#copyRule(IResource, IResource)
- * @since 2.0
- */
- public void copy(IPath destination, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Makes a copy of this project using the given project description.
- *
- *
- * SHALLOW
is specified.
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- *
- * copy(description, (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be copied. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- */
- public void copy(IProjectDescription description, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Makes a copy of this project using the given project description. The project's descendents are
- * copied as well. The description specifies the name, location and attributes of the new project.
- * After successful completion, corresponding new resources will exist at the given path; their
- * contents and properties will be copies of the originals. The original resources are not
- * affected.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to copy resources that are in sync with the
- * corresponding files and directories in the local file system; it will fail if it encounters a
- * resource that is out of sync with the file system. However, if FORCE
is specified,
- * the method copies all corresponding files and directories from the local file system, including
- * ones that have been recently updated or created. Note that in both settings of the FORCE
- *
flag, the operation fails if the newly created resources in the workspace would be out
- * of sync with the local file system; this ensures files in the file system cannot be
- * accidentally overwritten.
- *
- * SHALLOW
update flag controls how this method deals with linked resources.
- * If SHALLOW
is not specified, then the underlying contents of any linked resources
- * in the project will always be copied in the file system. In this case, the destination of the
- * copy will never contain any linked resources. If SHALLOW
is specified when a
- * project containing linked resources is copied, new linked resources are created in the
- * destination project that point to the same file system locations. In this case, no files on
- * disk under linked resources are actually copied. The SHALLOW
update flag is
- * ignored when copying non- linked resources.
- *
- * FORCE
or SHALLOW
are ignored.
- *
- * FORCE
and SHALLOW
- *
)
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this resource could not be copied. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #FORCE
- * @see #SHALLOW
- * @see IResourceRuleFactory#copyRule(IResource, IResource)
- * @since 2.0
- */
- public void copy(IProjectDescription description, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Creates and returns the marker with the specified type on this resource. Marker type ids should
- * be the id of an extension installed in the FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * org.eclipse.core.resources.markers
- * extension point. The specified type string must not be null
.
- *
- * @param type the type of the marker to create
- * @return the handle of the new marker
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public IMarker createMarker(String type) throws CoreException;
-
- /**
- * Creates a resource proxy representing the current state of this resource.
- *
- *
- * delete(force ? FORCE : IResource.NONE, monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#delete(int,IProgressMonitor)
- */
- public void delete(boolean force, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Deletes this resource from the workspace. Deletion applies recursively to all members of this
- * resource in a "best- effort" fashion. That is, all resources which can be deleted are deleted.
- * Resources which could not be deleted are noted in a thrown exception. The method does not fail
- * if resources do not exist; it fails only if resources could not be deleted.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IFile#delete(boolean, boolean, IProgressMonitor)
- * @see IFolder#delete(boolean, boolean, IProgressMonitor)
- * @see #FORCE
- * @see #KEEP_HISTORY
- * @see #ALWAYS_DELETE_PROJECT_CONTENT
- * @see #NEVER_DELETE_PROJECT_CONTENT
- * @see IResourceRuleFactory#deleteRule(IResource)
- * @since 2.0
- */
- public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Deletes all markers on this resource of the given type, and, optionally, deletes such markers
- * from its children. If IResourceChangeEvent
for more details.
- * includeSubtypes
is false
, only markers whose
- * type exactly matches the given type are deleted.
- *
- * null
to indicate all types
- * @param includeSubtypes whether or not to consider sub-types of the given type
- * @param depth how far to recurse (see IResource.DEPTH_*
)
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void deleteMarkers(String type, boolean includeSubtypes, int depth) throws CoreException;
-
- /**
- * Compares two objects for equality; for resources, equality is defined in terms of their
- * handles: same resource type, equal full paths, and identical workspaces. Resources are not
- * equal to objects other than resources.
- *
- * @param other the other object
- * @return an indication of whether the objects are equals
- * @see #getType()
- * @see #getFullPath()
- * @see #getWorkspace()
- */
- public boolean equals(Object other);
-
- /**
- * Returns whether this resource exists in the workspace.
- *
- * IResourceChangeEvent
for more details.
- * IResource
objects are lightweight handle objects used to access resources in
- * the workspace. However, having a handle object does not necessarily mean the workspace really
- * has such a resource. When the workspace does have a genuine resource of a matching type, the
- * resource is said to exist, and this method returns true
; in all other
- * cases, this method returns false
. In particular, it returns false
if
- * the workspace has no resource at that path, or if it has a resource at that path with a type
- * different from the type of this resource handle.
- *
- * true
if the resource exists, otherwise false
- */
- public boolean exists();
-
- /**
- * Returns the marker with the specified id on this resource, Returns null
if there
- * is no matching marker.
- *
- * @param id the id of the marker to find
- * @return a marker or null
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public IMarker findMarker(long id) throws CoreException;
-
- /**
- * Returns all markers of the specified type on this resource, and, optionally, on its children.
- * If includeSubtypes
is false
, only markers whose type exactly matches
- * the given type are returned. Returns an empty array if there are no matching markers.
- *
- * @param type the type of marker to consider, or null
to indicate all types
- * @param includeSubtypes whether or not to consider sub-types of the given type
- * @param depth how far to recurse (see IResource.DEPTH_*
)
- * @return an array of markers
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- */
- public IMarker[] findMarkers(String type, boolean includeSubtypes, int depth)
- throws CoreException;
-
- /**
- * Returns the maximum value of the {@link IMarker#SEVERITY} attribute across markers of the
- * specified type on this resource, and, optionally, on its children. If includeSubtypes
- *
is false
, only markers whose type exactly matches the given type are
- * considered. Returns -1
if there are no matching markers. Returns {@link
- * IMarker#SEVERITY_ERROR} if any of the markers has a severity greater than or equal to {@link
- * IMarker#SEVERITY_ERROR}.
- *
- * @param type the type of marker to consider (normally {@link IMarker#PROBLEM} or one of its
- * subtypes), or null
to indicate all types
- * @param includeSubtypes whether or not to consider sub-types of the given type
- * @param depth how far to recurse (see IResource.DEPTH_*
)
- * @return {@link IMarker#SEVERITY_INFO}, {@link IMarker#SEVERITY_WARNING}, {@link
- * IMarker#SEVERITY_ERROR}, or -1
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @since 3.3
- */
- public int findMaxProblemSeverity(String type, boolean includeSubtypes, int depth)
- throws CoreException;
-
- /**
- * Returns the file extension portion of this resource's name, or null
if it does not
- * have one.
- *
- * Path.ROOT
- *
.
- *
- * NULL_STAMP
- *
if the resource does not exist or is not local or is not accessible. The return value
- * is represented as the number of milliseconds since the epoch (00:00:00 GMT, January 1, 1970).
- * The returned value may not be the same as the actual time stamp on disk if the file has been
- * modified externally since the last local refresh.
- *
- * getModificationStamp
.
- *
- * @return a local file system time stamp, or NULL_STAMP
.
- * @since 3.0
- */
- public long getLocalTimeStamp();
-
- /**
- * Returns the absolute path in the local file system to this resource, or null
if no
- * path can be determined.
- *
- * null
) path computed from the
- * location of the project's local content area and the project- relative path of the file or
- * folder. This is true regardless of whether the file or folders exists, or whether the project
- * is open or closed. In the case of linked resources, the location of a linked resource within a
- * closed project is too computed from the location of the project's local content area and the
- * project-relative path of the resource. If the linked resource resides in an open project then
- * its location is computed according to the link.
- *
- * null
. This method also returns
- * null
if called on a resource that is not stored in the local file system. For such
- * resources {@link #getLocationURI()} should be used instead.
- *
- * @return the absolute path of this resource in the local file system, or null
if no
- * path can be determined
- * @see #getRawLocation()
- * @see #getLocationURI()
- * @see IProjectDescription#setLocation(IPath)
- * @see Platform#getLocation()
- */
- public IPath getLocation();
-
- /**
- * Returns the absolute URI of this resource, or null
if no URI can be determined.
- *
- * null
) URI computed from the location
- * of the project's local content area and the project- relative path of the file or folder. This
- * is true regardless of whether the file or folders exists, or whether the project is open or
- * closed. In the case of linked resources, the location of a linked resource within a closed
- * project is computed from the location of the project's local content area and the
- * project-relative path of the resource. If the linked resource resides in an open project then
- * its location is computed according to the link.
- *
- * null
.
- *
- * @return the absolute URI of this resource, or null
if no URI can be determined
- * @see #getRawLocation()
- * @see IProjectDescription#setLocation(IPath)
- * @see Platform#getLocation()
- * @see java.net.URI
- * @since 3.2
- */
- public URI getLocationURI();
-
- /**
- * Returns a marker handle with the given id on this resource. This resource is not checked to see
- * if it has such a marker. The returned marker need not exist. This resource need not exist.
- *
- * @param id the id of the marker
- * @return the specified marker handle
- * @see IMarker#getId()
- */
- public IMarker getMarker(long id);
-
- /**
- * Returns a non-negative modification stamp, or NULL_STAMP
if the resource does not
- * exist or is not local or is not accessible.
- *
- *
- *
- *
- * The following things do not affect a resource's modification stamp:
- *
- * NULL_STAMP
)
- * touch
ing a resource
- * NULL_STAMP
)
- * NULL_STAMP
, destination changes from
- * NULL_STAMP
)
- * NULL_STAMP
)
- * NULL_STAMP
)
- * NULL_STAMP
)
- * NULL_STAMP
)
- *
- *
- *
- * @return the modification stamp, or NULL_STAMP
if this resource either does not
- * exist or exists as a closed project
- * @see IResource#NULL_STAMP
- * @see #revertModificationStamp(long)
- */
- public long getModificationStamp();
-
- /**
- * Returns the name of this resource. The name of a resource is synonymous with the last segment
- * of its full (or project-relative) path for all resources other than the workspace root. The
- * workspace root's name is the empty string.
- *
- * null
if it has no
- * parent (that is, this resource is the workspace root).
- *
- * null
if it has no parent
- */
- public IContainer getParent();
-
- /**
- * Returns a copy of the map of this resource's persistent properties. Returns an empty map if
- * this resource has no persistent properties.
- *
- * @return the map containing the persistent properties where the key is the {@link QualifiedName}
- * of the property and the value is the {@link String} value of the property.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #setPersistentProperty(QualifiedName, String)
- * @since 3.4
- */
- public Mapnull
if this resource has no such property.
- *
- * @param key the qualified name of the property
- * @return the string value of the property, or null
if this resource has no such
- * property
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #setPersistentProperty(QualifiedName, String)
- */
- public String getPersistentProperty(QualifiedName key) throws CoreException;
-
- /**
- * Returns the project which contains this resource. Returns itself for projects and null
- *
for the workspace root.
- *
- * null
if no path can be
- * determined. The returned path will either be an absolute file system path, or a relative path
- * whose first segment is the name of a workspace path variable.
- *
- * null
if no path
- * can be determined
- * @see #getLocation()
- * @see IFile#createLink(IPath, int, IProgressMonitor)
- * @see IFolder#createLink(IPath, int, IProgressMonitor)
- * @see IPathVariableManager
- * @see IProjectDescription#getLocation()
- * @since 2.1
- */
- public IPath getRawLocation();
-
- /**
- * Returns the raw location of this resource, or null
if no path can be determined.
- * The returned path will either be an absolute URI, or a relative URI whose first path segment is
- * the name of a workspace path variable. Since the returned location may contain unresolved
- * variables, the resulting URI is typically only suitable for display. To access or manipulate
- * the actual resource backing location, clients should obtain the resolved location using {@link
- * #getLocationURI()}.
- *
- * null
if no location can be
- * determined
- * @see #getLocationURI()
- * @see IFile#createLink(URI, int, IProgressMonitor)
- * @see IFolder#createLink(URI, int, IProgressMonitor)
- * @see IPathVariableManager
- * @see IProjectDescription#getLocationURI()
- * @since 3.2
- */
- public URI getRawLocationURI();
-
- /**
- * Gets this resource's extended attributes from the file system, or null
if the
- * attributes could not be obtained.
- *
- * null
return value include:
- *
- *
- *
- *
- *
- * false
.
- *
- *
- *
- *
- * IResource resource;
- *
- * @return the extended attributes from the file system, or
- * ...
- * ResourceAttributes attributes = resource.getResourceAttributes();
- * if (attributes != null) {
- * attributes.setExecutable(true);
- * resource.setResourceAttributes(attributes);
- * }
- * null
if they could not be
- * obtained
- * @see #setResourceAttributes(ResourceAttributes)
- * @see ResourceAttributes
- * @since 3.1
- */
- public ResourceAttributes getResourceAttributes();
-
- /**
- * Returns a copy of the map of this resource's session properties. Returns an empty map if this
- * resource has no session properties.
- *
- * @return the map containing the session properties where the key is the {@link QualifiedName} of
- * the property and the value is the property value (an {@link Object}.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #setSessionProperty(QualifiedName, Object)
- * @since 3.4
- */
- public Mapnull
if this resource has no such property.
- *
- * @param key the qualified name of the property
- * @return the value of the session property, or null
if this resource has no such
- * property
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #setSessionProperty(QualifiedName, Object)
- */
- public Object getSessionProperty(QualifiedName key) throws CoreException;
-
- /**
- * Returns the type of this resource. The returned value will be one of FILE
,
- * FOLDER
, PROJECT
, ROOT
.
- *
- *
- *
- *
- * FILE
implement IFile
.
- * FOLDER
implement IFolder
.
- * PROJECT
implement IProject
.
- * ROOT
implement IWorkspaceRoot
.
- * true
if this resource is accessible, and false
otherwise
- * @see #exists()
- * @see IProject#isOpen()
- */
- public boolean isAccessible();
-
- /**
- * Returns whether this resource subtree is marked as derived. Returns false
if this
- * resource does not exist.
- *
- * isDerived(IResource.NONE)
.
- *
- * @return true
if this resource is marked as derived, and false
- * otherwise
- * @see #setDerived(boolean)
- * @since 2.0
- */
- public boolean isDerived();
-
- /**
- * Returns whether this resource subtree is marked as derived. Returns false
if this
- * resource does not exist.
- *
- * true
, if this resource, or any parent resource, is marked as
- * derived. If the {@link #CHECK_ANCESTORS} option flag is not specified, this method returns
- * false for children of derived resources.
- *
- * @param options bit-wise or of option flag constants (only {@link #CHECK_ANCESTORS} is
- * applicable)
- * @return true
if this resource subtree is derived, and false
otherwise
- * @see IResource#setDerived(boolean)
- * @since 3.4
- */
- public boolean isDerived(int options);
-
- /**
- * Returns whether this resource is hidden in the resource tree. Returns false
if
- * this resource does not exist.
- *
- * true
if this resource is hidden , and false
otherwise
- * @see #setHidden(boolean)
- * @since 3.4
- */
- public boolean isHidden();
-
- /**
- * Returns whether this resource is hidden in the resource tree. Returns false
if
- * this resource does not exist.
- *
- * true
if this resource, or any parent resource, is a hidden
- * resource. If the {@link #CHECK_ANCESTORS} option flag is not specified, this method returns
- * false for children of hidden resources.
- *
- * @param options bit-wise or of option flag constants (only {@link #CHECK_ANCESTORS} is
- * applicable)
- * @return true
if this resource is hidden , and false
otherwise
- * @see #setHidden(boolean)
- * @since 3.5
- */
- public boolean isHidden(int options);
-
- /**
- * Returns whether this resource has been linked to a location other than the default location
- * calculated by the platform.
- *
- * isLinked(IResource.NONE)
.
- *
- * @return true
if this resource is linked, and false
otherwise
- * @see IFile#createLink(IPath, int, IProgressMonitor)
- * @see IFolder#createLink(IPath, int, IProgressMonitor)
- * @since 2.1
- */
- public boolean isLinked();
-
- /**
- * Returns whether this resource is a virtual resource. Returns true
for folders that
- * have been marked virtual using the {@link #VIRTUAL} update flag. Returns false
in
- * all other cases, including the case where this resource does not exist. The workspace root,
- * projects and files currently cannot be made virtual.
- *
- * @return true
if this resource is virtual, and false
otherwise
- * @see IFile#create(java.io.InputStream, int, IProgressMonitor)
- * @see #VIRTUAL
- * @since 3.6
- */
- public boolean isVirtual();
-
- /**
- * Returns true
if this resource has been linked to a location other than the default
- * location calculated by the platform. This location can be outside the project's content area or
- * another location within the project. Returns false
in all other cases, including
- * the case where this resource does not exist. The workspace root and projects are never linked.
- *
- * createLink
- *
method.
- *
- * true
if this resource, or any parent resource, is a linked
- * resource. If the {@link #CHECK_ANCESTORS} option flag is not specified, this method returns
- * false for children of linked resources.
- *
- * @param options bit-wise or of option flag constants (only {@link #CHECK_ANCESTORS} is
- * applicable)
- * @return true
if this resource is linked, and false
otherwise
- * @see IFile#createLink(IPath, int, IProgressMonitor)
- * @see IFolder#createLink(IPath, int, IProgressMonitor)
- * @since 3.2
- */
- public boolean isLinked(int options);
-
- /**
- * Returns whether this resource and its members (to the specified depth) are expected to have
- * their contents (and properties) available locally. Returns false
in all other
- * cases, including the case where this resource does not exist. The workspace root and projects
- * are always local.
- *
- * DEPTH_ZERO
, DEPTH_ONE
, or
- * DEPTH_INFINITE
- * @return true
if this resource is local, and false
otherwise
- * @see #setLocal(boolean, int, IProgressMonitor)
- * @deprecated This API is no longer in use. Note that this API is unrelated to whether the
- * resource is in the local file system versus some other file system.
- */
- @Deprecated
- public boolean isLocal(int depth);
-
- /**
- * Returns whether this resource is a phantom resource.
- *
- * exists
- *
, which returns false
for phantoms) are therefore invisible except through
- * a handful of phantom-enabled API methods (notably IContainer.members(boolean)
).
- *
- * @return true
if this resource is a phantom resource, and false
- * otherwise
- * @see #exists()
- * @see IContainer#members(boolean)
- * @see IContainer#findMember(String, boolean)
- * @see IContainer#findMember(IPath, boolean)
- * @see ISynchronizer
- */
- public boolean isPhantom();
-
- /**
- * Returns whether this resource is marked as read-only in the file system.
- *
- * @return true
if this resource is read-only, false
otherwise
- * @deprecated use IResource#getResourceAttributes()
- */
- @Deprecated
- public boolean isReadOnly();
-
- /**
- * Returns whether this resource and its descendents to the given depth are considered to be in
- * sync with the local file system.
- *
- *
- *
- *
- * A resource is also considered to be in sync if it is missing from both the workspace and the
- * file system. In all other cases the resource is considered to be out of sync.
- *
- * IResource.DEPTH_ZERO
, DEPTH_ONE
, or
- * DEPTH_INFINITE
)
- * @return true
if this resource and its descendents to the specified depth are
- * synchronized, and false
in all other cases
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @see #refreshLocal(int, IProgressMonitor)
- * @since 2.0
- */
- public boolean isSynchronized(int depth);
-
- /**
- * Returns whether this resource is a team private member of its parent container. Returns
- * false
if this resource does not exist.
- *
- * @return true
if this resource is a team private member, and false
- * otherwise
- * @see #setTeamPrivateMember(boolean)
- * @since 2.0
- */
- public boolean isTeamPrivateMember();
-
- /**
- * Returns whether this resource is a team private member of its parent container. Returns
- * false
if this resource does not exist.
- *
- * true
if this resource, or any parent resource, is a team
- * private member. If the {@link #CHECK_ANCESTORS} option flag is not specified, this method
- * returns false for children of team private members.
- *
- * @param options bit-wise or of option flag constants (only {@link #CHECK_ANCESTORS} is
- * applicable)
- * @return true
if this resource is a team private member, and false
- * otherwise
- * @see #setTeamPrivateMember(boolean)
- * @since 3.5
- */
- public boolean isTeamPrivateMember(int options);
-
- /**
- * Moves this resource so that it is located at the given path.
- *
- *
- * move(destination, force ? FORCE : IResource.NONE, monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceDelta#getFlags()
- */
- public void move(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Moves this resource so that it is located at the given path. The path of the resource must not
- * be a prefix of the destination path. The workspace root may not be the source or destination
- * location of a move operation, and a project can only be moved to another project. After
- * successful completion, the resource and any direct or indirect members will no longer exist;
- * but corresponding new resources will now exist at the given path.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- *
- * IProjectDescription description = getDescription();
- * description.setName(path.lastSegment());
- * move(description, updateFlags, monitor);
- *
- *
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to move resources that are in sync with the
- * corresponding files and directories in the local file system; it will fail if it encounters a
- * resource that is out of sync with the file system. However, if FORCE
is specified,
- * the method moves all corresponding files and directories from the local file system, including
- * ones that have been recently updated or created. Note that in both settings of the FORCE
- *
flag, the operation fails if the newly created resources in the workspace would be out
- * of sync with the local file system; this ensures files in the file system cannot be
- * accidentally overwritten.
- *
- * KEEP_HISTORY
update flag controls whether or not file that are about to be
- * deleted from the local file system have their current contents saved in the workspace's local
- * history. The local history mechanism serves as a safety net to help the user recover from
- * mistakes that might otherwise result in data loss. Specifying KEEP_HISTORY
is
- * recommended except in circumstances where past states of the files are of no conceivable
- * interest to the user. Note that local history is maintained with each individual project, and
- * gets discarded when a project is deleted from the workspace. Hence KEEP_HISTORY
is
- * only really applicable when moving files and folders, but not whole projects.
- *
- * SHALLOW
update flag controls how this method deals with linked resources.
- * If SHALLOW
is not specified, then the underlying contents of the linked resource
- * will always be moved in the file system. In this case, the destination of the move will never
- * be a linked resource or contain any linked resources. If SHALLOW
is specified when
- * a linked resource is moved into another project, a new linked resource is created in the
- * destination project that points to the same file system location. When a project containing
- * linked resources is moved, the new project will contain the same linked resources pointing to
- * the same file system locations. For either of these cases, no files on disk under the linked
- * resource are actually moved. With the SHALLOW
flag, moving of linked resources
- * into anything other than a project is not permitted. The SHALLOW
update flag is
- * ignored when moving non- linked resources.
- *
- * FORCE
, KEEP_HISTORY
and SHALLOW
- *
are ignored.
- *
- * FORCE
, KEEP_HISTORY
- *
and SHALLOW
)
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceDelta#getFlags()
- * @see #FORCE
- * @see #KEEP_HISTORY
- * @see #SHALLOW
- * @see IResourceRuleFactory#moveRule(IResource, IResource)
- * @since 2.0
- */
- public void move(IPath destination, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Renames or relocates this project so that it is the project specified by the given project
- * description.
- *
- *
- * SHALLOW
is specified.
- * force
is false
.
- * IResourceChangeEvent
for more details.
- *
- * move(description, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceDelta#getFlags()
- */
- public void move(
- IProjectDescription description, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Renames or relocates this project so that it is the project specified by the given project
- * description. The description specifies the name and location of the new project. After
- * successful completion, the old project and any direct or indirect members will no longer exist;
- * but corresponding new resources will now exist in the new project.
- *
- * force
is false
.
- * IResourceChangeEvent
for more details.
- * FORCE
update flag controls how this method deals with cases where the
- * workspace is not completely in sync with the local file system. If FORCE
is not
- * specified, the method will only attempt to move resources that are in sync with the
- * corresponding files and directories in the local file system; it will fail if it encounters a
- * resource that is out of sync with the file system. However, if FORCE
is specified,
- * the method moves all corresponding files and directories from the local file system, including
- * ones that have been recently updated or created. Note that in both settings of the FORCE
- *
flag, the operation fails if the newly created resources in the workspace would be out
- * of sync with the local file system; this ensures files in the file system cannot be
- * accidentally overwritten.
- *
- * KEEP_HISTORY
update flag controls whether or not file that are about to be
- * deleted from the local file system have their current contents saved in the workspace's local
- * history. The local history mechanism serves as a safety net to help the user recover from
- * mistakes that might otherwise result in data loss. Specifying KEEP_HISTORY
is
- * recommended except in circumstances where past states of the files are of no conceivable
- * interest to the user. Note that local history is maintained with each individual project, and
- * gets discarded when a project is deleted from the workspace. Hence KEEP_HISTORY
is
- * only really applicable when moving files and folders, but not whole projects.
- *
- * SHALLOW
update flag controls how this method deals with linked resources.
- * If SHALLOW
is not specified, then the underlying contents of any linked resource
- * will always be moved in the file system. In this case, the destination of the move will not
- * contain any linked resources. If SHALLOW
is specified when a project containing
- * linked resources is moved, new linked resources are created in the destination project pointing
- * to the same file system locations. In this case, no files on disk under any linked resource are
- * actually moved. The SHALLOW
update flag is ignored when moving non- linked
- * resources.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this resource could not be moved. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceDelta#getFlags()
- * @see #FORCE
- * @see #KEEP_HISTORY
- * @see #SHALLOW
- * @see #REPLACE
- * @see IResourceRuleFactory#moveRule(IResource, IResource)
- * @since 2.0
- */
- public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Refreshes the resource hierarchy from this resource and its children (to the specified depth)
- * relative to the local file system. Creations, deletions, and changes detected in the local file
- * system will be reflected in the workspace's resource tree. This resource need not exist or be
- * local.
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- * DEPTH_ZERO
, DEPTH_ONE
, or
- * DEPTH_INFINITE
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#DEPTH_ZERO
- * @see IResource#DEPTH_ONE
- * @see IResource#DEPTH_INFINITE
- * @see IResourceRuleFactory#refreshRule(IResource)
- */
- public void refreshLocal(int depth, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Reverts this resource's modification stamp. This is intended to be used by a client that is
- * rolling back or undoing a previous change to this resource.
- *
- * IResourceChangeEvent
for more details.
- * getModificationStamp
is honored; the modification stamp of two distinct
- * resource states should be different if and only if one or more of the attributes listed in the
- * specification as affecting the modification stamp have changed.
- *
- *
- * setLocalTimeStamp
method.
- *
- * @param value A non-negative modification stamp value
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getModificationStamp()
- * @since 3.1
- */
- public void revertModificationStamp(long value) throws CoreException;
-
- /**
- * Sets whether this resource subtree is marked as derived.
- *
- * IResourceChangeEvent
for more details.
- * setDerived(true)
. Derived marks are maintained in the in-memory resource
- * tree, and are discarded when the resources are deleted. Derived marks are saved to disk when a
- * project is closed, or when the workspace is saved.
- *
- * true
if this resource is to be marked as derived, and false
- *
otherwise
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #isDerived()
- * @since 2.0
- * @deprecated Replaced by {@link #setDerived(boolean, IProgressMonitor)} which is a workspace
- * operation and reports changes in resource deltas.
- */
- @Deprecated
- public void setDerived(boolean isDerived) throws CoreException;
-
- /**
- * Sets whether this resource subtree is marked as derived.
- *
- * IResourceChangeEvent
for more details.
- * setDerived(true, IProgressMonitor)
. Derived marks are maintained in the
- * in-memory resource tree, and are discarded when the resources are deleted. Derived marks are
- * saved to disk when a project is closed, or when the workspace is saved.
- *
- * true
if this resource is to be marked as derived, and false
- *
otherwise
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception OperationCanceledException if the operation is canceled. Cancellation can occur even
- * if no progress monitor is provided.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #isDerived()
- * @see IResourceRuleFactory#derivedRule(IResource)
- * @since 3.6
- */
- public void setDerived(boolean isDerived, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Sets whether this resource and its members are hidden in the resource tree.
- *
- * IResourceChangeEvent
for more details.
- * true
if this resource is to be marked as hidden, and false
- *
otherwise
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #isHidden()
- * @since 3.4
- */
- public void setHidden(boolean isHidden) throws CoreException;
-
- /**
- * Set whether or not this resource and its members (to the specified depth) are expected to have
- * their contents (and properties) available locally. The workspace root and projects are always
- * local and attempting to set either to non-local (i.e., passing IResourceChangeEvent
for more details.
- * false
) has no
- * effect on the resource.
- *
- * DEPTH_ZERO
, DEPTH_ONE
, or
- * DEPTH_INFINITE
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #isLocal(int)
- * @deprecated This API is no longer in use. Note that this API is unrelated to whether the
- * resource is in the local file system versus some other file system.
- */
- @Deprecated
- public void setLocal(boolean flag, int depth, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Sets the local time stamp on disk for this resource. The time must be represented as the number
- * of milliseconds since the epoch (00:00:00 GMT, January 1, 1970). Returns the actual time stamp
- * that was recorded. Due to varying file system timing granularities, the provided value may be
- * rounded or otherwise truncated, so the actual recorded time stamp that is returned may not be
- * the same as the supplied value.
- *
- * @param value a time stamp in milliseconds.
- * @return a local file system time stamp.
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @since 3.0
- */
- public long setLocalTimeStamp(long value) throws CoreException;
-
- /**
- * Sets the value of the persistent property of this resource identified by the given key. If the
- * supplied value is IResourceChangeEvent
for more details.
- * null
, the persistent property is removed from this resource. The
- * change is made immediately on disk.
- *
- * "com.example.plugin"
).
- *
- * @param key the qualified name of the property
- * @param value the string value of the property, or null
if the property is to be
- * removed
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getPersistentProperty(QualifiedName)
- * @see #isLocal(int)
- */
- public void setPersistentProperty(QualifiedName key, String value) throws CoreException;
-
- /**
- * Sets or unsets this resource as read-only in the file system.
- *
- * @param readOnly IResourceChangeEvent
for more details.
- * true
to set it to read-only, false
to unset
- * @deprecated use IResource#setResourceAttributes(ResourceAttributes)
- */
- @Deprecated
- public void setReadOnly(boolean readOnly);
-
- /**
- * Sets this resource with the given extended attributes. This sets the attributes in the file
- * system. Only attributes that are supported by the underlying file system will be set.
- *
- *
- *
- *
- * IResource resource;
- *
- *
- * ...
- * if (attributes != null) {
- * attributes.setExecutable(true);
- * resource.setResourceAttributes(attributes);
- * }
- *
- *
- *
- * @see #getResourceAttributes()
- * @since 3.1
- */
- void setResourceAttributes(ResourceAttributes attributes) throws CoreException;
-
- /**
- * Sets the value of the session property of this resource identified by the given key. If the
- * supplied value is null
, the session property is removed from this resource.
- *
- * "com.example.plugin"
).
- *
- * @param key the qualified name of the property
- * @param value the value of the session property, or null
if the property is to be
- * removed
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #getSessionProperty(QualifiedName)
- */
- public void setSessionProperty(QualifiedName key, Object value) throws CoreException;
-
- /**
- * Sets whether this resource subtree is a team private member of its parent container.
- *
- * IResourceChangeEvent
for more details.
- * setTeamPrivateMember(true)
. Team private
- * member marks are maintained in the in-memory resource tree, and are discarded when the
- * resources are deleted. Team private member marks are saved to disk when a project is closed, or
- * when the workspace is saved.
- *
- * true
if this resource is to be marked as team private, and
- * false
otherwise
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @see #isTeamPrivateMember()
- * @since 2.0
- */
- public void setTeamPrivateMember(boolean isTeamPrivate) throws CoreException;
-
- /**
- * Marks this resource as having changed even though its content may not have changed. This method
- * can be used to trigger the rebuilding of resources/structures derived from this resource.
- * Touching the workspace root has no effect.
- *
- * IResourceChangeEvent
for more details.
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResourceRuleFactory#modifyRule(IResource)
- * @see IResourceDelta#CONTENT
- * @see IResourceDelta#DESCRIPTION
- */
- public void touch(IProgressMonitor monitor) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceChangeEvent.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceChangeEvent.java
deleted file mode 100644
index a4b89048f4c..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceChangeEvent.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IResourceChangeEvent
for more details.
- *
- *
- *
- * PRE_BUILD
- *
, and getDelta
returns the hierarchical delta rooted at the workspace
- * root. The getBuildKind
method returns the kind of build that is about to
- * occur, and the getSource
method returns the scope of the build (either the
- * workspace or a single project). These events are broadcast to interested parties
- * immediately before each build operation. If autobuilding is not enabled, these events still
- * occur at times when autobuild would have occurred. The workspace is open for change during
- * notification of these events. The delta reported in this event cycle is identical across
- * all listeners registered for this type of event. Resource changes attempted during a
- * PRE_BUILD
callback must be done in the thread doing the notification.
- * POST_BUILD
- *
, and getDelta
returns the hierarchical delta rooted at the workspace
- * root. The getBuildKind
method returns the kind of build that occurred, and the
- * getSource
method returns the scope of the build (either the workspace or a
- * single project). These events are broadcast to interested parties at the end of every build
- * operation. If autobuilding is not enabled, these events still occur at times when autobuild
- * would have occurred. The workspace is open for change during notification of these events.
- * The delta reported in this event cycle is identical across all listeners registered for
- * this type of event. Resource changes attempted during a POST_BUILD
callback
- * must be done in the thread doing the notification.
- * POST_CHANGE
- *
, and getDelta
returns the hierarchical delta. The resource delta is
- * rooted at the workspace root. These events are broadcast to interested parties after a set
- * of resource changes and happen whether or not autobuilding is enabled. The workspace is
- * closed for change during notification of these events. The delta reported in this event
- * cycle is identical across all listeners registered for this type of event.
- *
- * PRE_CLOSE
, and getResource
returns the project being closed. The
- * workspace is closed for change during notification of these events.
- *
- * PRE_DELETE
, and getResource
returns the project being deleted. The
- * workspace is closed for change during notification of these events.
- * PRE_REFRESH
and the getSource
method returns the
- * scope of the refresh (either the workspace or a single project). If the event is fired by a
- * project refresh the getResource
method returns the project being refreshed.
- * The workspace is closed for changes during notification of these events.
- * getDelta
. See class comments for further details.
- *
- * @see #getType()
- * @see #getDelta()
- */
- public static final int POST_CHANGE = 1;
-
- /**
- * Event type constant (bit mask) indicating a before-the-fact report of the impending closure of
- * a single project as returned by getResource
. See class comments for further
- * details.
- *
- * @see #getType()
- * @see #getResource()
- */
- public static final int PRE_CLOSE = 2;
-
- /**
- * Event type constant (bit mask) indicating a before-the-fact report of the impending deletion of
- * a single project as returned by getResource
. See class comments for further
- * details.
- *
- * @see #getType()
- * @see #getResource()
- */
- public static final int PRE_DELETE = 4;
-
- /** @deprecated This event type has been renamed to PRE_BUILD
*/
- @Deprecated public static final int PRE_AUTO_BUILD = 8;
-
- /**
- * Event type constant (bit mask) indicating a before-the-fact report of a build. The event
- * contains a hierarchical resource delta as returned by getDelta
. See class comments
- * for further details.
- *
- * @see #getBuildKind()
- * @see #getSource()
- * @since 3.0
- */
- public static final int PRE_BUILD = 8;
-
- /** @deprecated This event type has been renamed to POST_BUILD
*/
- @Deprecated public static final int POST_AUTO_BUILD = 16;
-
- /**
- * Event type constant (bit mask) indicating an after-the-fact report of a build. The event
- * contains a hierarchical resource delta as returned by getDelta
. See class comments
- * for further details.
- *
- * @see #getBuildKind()
- * @see #getSource()
- * @since 3.0
- */
- public static final int POST_BUILD = 16;
-
- /**
- * Event type constant (bit mask) indicating a before-the-fact report of refreshing the workspace
- * or a project. See class comments for further details.
- *
- * @see #getType()
- * @see #getSource()
- * @see #getResource()
- * @since 3.4
- */
- public static final int PRE_REFRESH = 32;
-
- /**
- * Returns all marker deltas of the specified type that are associated with resource deltas for
- * this event. If includeSubtypes
is false
, only marker deltas whose
- * type exactly matches the given type are returned. Returns an empty array if there are no
- * matching marker deltas.
- *
- * null
to indicate all types
- * @param includeSubtypes whether or not to consider sub-types of the given type
- * @return an array of marker deltas
- * @since 2.0
- */
- public IMarkerDelta[] findMarkerDeltas(String type, boolean includeSubtypes);
-
- /**
- * Returns the kind of build that caused this event, or 0
if not applicable to this
- * type of event.
- *
- * PRE_BUILD
or POST_BUILD
then this will be the
- * kind of build that occurred to cause the event.
- *
- * @see IProject#build(int, IProgressMonitor)
- * @see IWorkspace#build(int, IProgressMonitor)
- * @see IncrementalProjectBuilder#AUTO_BUILD
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IncrementalProjectBuilder#CLEAN_BUILD
- * @return the kind of build, or 0
if not applicable
- * @since 3.1
- */
- public int getBuildKind();
-
- /**
- * Returns a resource delta, rooted at the workspace, describing the set of changes that happened
- * to resources in the workspace. Returns null
if not applicable to this type of
- * event.
- *
- * @return the resource delta, or null
if not applicable
- */
- public IResourceDelta getDelta();
-
- /**
- * Returns the resource in question or null
if not applicable to this type of event.
- *
- * PRE_CLOSE
, PRE_DELETE
, or
- * PRE_REFRESH
, then the resource will be the affected project. Otherwise the resource will
- * be null
.
- *
- * @return the resource, or null
if not applicable
- */
- public IResource getResource();
-
- /**
- * Returns an object identifying the source of this event.
- *
- * PRE_BUILD
, POST_BUILD
, or PRE_REFRESH
- *
then this will be the scope of the build (either the {@link IWorkspace} or a single
- * {@link IProject}).
- *
- * @return an object identifying the source of this event
- * @see java.util.EventObject
- */
- public Object getSource();
-
- /**
- * Returns the type of event being reported.
- *
- * @return one of the event type constants
- * @see #POST_CHANGE
- * @see #POST_BUILD
- * @see #PRE_BUILD
- * @see #PRE_CLOSE
- * @see #PRE_DELETE
- * @see #PRE_REFRESH
- */
- public int getType();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceChangeListener.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceChangeListener.java
deleted file mode 100644
index f998fc85cf6..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceChangeListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see IResource
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResourceDelta extends IAdaptable {
-
- /*====================================================================
- * Constants defining resource delta kinds:
- *====================================================================*/
-
- /**
- * Delta kind constant indicating that the resource has not been changed in any way.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int NO_CHANGE = IElementComparator.K_NO_CHANGE;
-
- /**
- * Delta kind constant (bit mask) indicating that the resource has been added to its parent. That
- * is, one that appears in the "after" state, not in the "before" one.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int ADDED = 0x1;
-
- /**
- * Delta kind constant (bit mask) indicating that the resource has been removed from its parent.
- * That is, one that appears in the "before" state, not in the "after" one.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int REMOVED = 0x2;
-
- /**
- * Delta kind constant (bit mask) indicating that the resource has been changed. That is, one that
- * appears in both the "before" and "after" states.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int CHANGED = 0x4;
-
- /**
- * Delta kind constant (bit mask) indicating that a phantom resource has been added at the
- * location of the delta node.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int ADDED_PHANTOM = 0x8;
-
- /**
- * Delta kind constant (bit mask) indicating that a phantom resource has been removed from the
- * location of the delta node.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int REMOVED_PHANTOM = 0x10;
-
- /**
- * The bit mask which describes all possible delta kinds, including ones involving phantoms.
- *
- * @see IResourceDelta#getKind()
- */
- public static final int ALL_WITH_PHANTOMS =
- CHANGED | ADDED | REMOVED | ADDED_PHANTOM | REMOVED_PHANTOM;
-
- /*====================================================================
- * Constants which describe resource changes:
- *====================================================================*/
-
- /**
- * Change constant (bit mask) indicating that the content of the resource has changed.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int CONTENT = 0x100;
-
- /**
- * Change constant (bit mask) indicating that the resource was moved from another location. The
- * location in the "before" state can be retrieved using getMovedFromPath()
.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int MOVED_FROM = 0x1000;
-
- /**
- * Change constant (bit mask) indicating that the resource was moved to another location. The
- * location in the new state can be retrieved using getMovedToPath()
.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int MOVED_TO = 0x2000;
-
- /**
- * Change constant (bit mask) indicating that the resource was copied from another location. The
- * location in the "before" state can be retrieved using getMovedFromPath()
. This
- * flag is only used when describing potential changes using an {@link
- * IResourceChangeDescriptionFactory}.
- *
- * @see IResourceDelta#getFlags()
- * @since 3.2
- */
- public static final int COPIED_FROM = 0x800;
- /**
- * Change constant (bit mask) indicating that the resource was opened or closed. This flag is also
- * set when the project did not exist in the "before" state. For example, if the current state of
- * the resource is open then it was previously closed or did not exist.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int OPEN = 0x4000;
-
- /**
- * Change constant (bit mask) indicating that the type of the resource has changed.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int TYPE = 0x8000;
-
- /**
- * Change constant (bit mask) indicating that the resource's sync status has changed. This type of
- * change is not included in build deltas, only in those for resource notification.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int SYNC = 0x10000;
-
- /**
- * Change constant (bit mask) indicating that the resource's markers have changed. This type of
- * change is not included in build deltas, only in those for resource notification.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int MARKERS = 0x20000;
-
- /**
- * Change constant (bit mask) indicating that the resource has been replaced by another at the
- * same location (i.e., the resource has been deleted and then added).
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int REPLACED = 0x40000;
-
- /**
- * Change constant (bit mask) indicating that a project's description has changed.
- *
- * @see IResourceDelta#getFlags()
- */
- public static final int DESCRIPTION = 0x80000;
-
- /**
- * Change constant (bit mask) indicating that the encoding of the resource has changed.
- *
- * @see IResourceDelta#getFlags()
- * @since 3.0
- */
- public static final int ENCODING = 0x100000;
-
- /**
- * Change constant (bit mask) indicating that the underlying file or folder of the linked resource
- * has been added or removed.
- *
- * @see IResourceDelta#getFlags()
- * @since 3.4
- */
- public static final int LOCAL_CHANGED = 0x200000;
-
- /**
- * Change constant (bit mask) indicating that the derived flag of the resource has changed.
- *
- * @see IResourceDelta#getFlags()
- * @since 3.6
- */
- public static final int DERIVED_CHANGED = 0x400000;
-
- /**
- * Accepts the given visitor. The only kinds of resource deltas visited are ADDED
,
- * REMOVED
, and CHANGED
. The visitor's visit
method is
- * called with this resource delta if applicable. If the visitor returns true
, the
- * resource delta's children are also visited.
- *
- * accept(visitor, IResource.NONE)
- *
. Although the visitor will be invoked for this resource delta, it will not be invoked
- * for any team-private member resources.
- *
- * @param visitor the visitor
- * @exception CoreException if the visitor failed with this exception.
- * @see IResourceDeltaVisitor#visit(IResourceDelta)
- */
- public void accept(IResourceDeltaVisitor visitor) throws CoreException;
-
- /**
- * Accepts the given visitor. The visitor's visit
method is called with this resource
- * delta. If the visitor returns true
, the resource delta's children are also
- * visited.
- *
- *
- * accept(visitor, includePhantoms ? INCLUDE_PHANTOMS : IResource.NONE);
- *
- *
- * Although the visitor will be invoked for this resource delta, it will not be invoked for any
- * team-private member resources.
- *
- * @param visitor the visitor
- * @param includePhantoms true
if phantom resources are of interest; false
- *
if phantom resources are not of interest
- * @exception CoreException if the visitor failed with this exception.
- * @see #accept(IResourceDeltaVisitor)
- * @see IResource#isPhantom()
- * @see IResourceDeltaVisitor#visit(IResourceDelta)
- */
- public void accept(IResourceDeltaVisitor visitor, boolean includePhantoms) throws CoreException;
-
- /**
- * Accepts the given visitor. The visitor's visit
method is called with this resource
- * delta. If the visitor returns true
, the resource delta's children are also
- * visited.
- *
- * INCLUDE_PHANTOMS
member flag is not specified (recommended), only child
- * resource deltas involving existing resources will be visited (kinds ADDED
,
- * REMOVED
, and CHANGED
). If the INCLUDE_PHANTOMS
member flag is
- * specified, the result will also include additions and removes of phantom resources (kinds
- * ADDED_PHANTOM
and REMOVED_PHANTOM
).
- *
- * INCLUDE_TEAM_PRIVATE_MEMBERS
member flag is not specified (recommended),
- * resource deltas involving team private member resources will be excluded from the visit. If the
- * INCLUDE_TEAM_PRIVATE_MEMBERS
member flag is specified, the visit will also include
- * additions and removes of team private member resources.
- *
- * @param visitor the visitor
- * @param memberFlags bit-wise or of member flag constants (IContainer.INCLUDE_PHANTOMS
- *
, INCLUDE_HIDDEN
and INCLUDE_TEAM_PRIVATE_MEMBERS
)
- * indicating which members are of interest
- * @exception CoreException if the visitor failed with this exception.
- * @see IResource#isPhantom()
- * @see IResource#isTeamPrivateMember()
- * @see IResource#isHidden()
- * @see IContainer#INCLUDE_PHANTOMS
- * @see IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS
- * @see IContainer#INCLUDE_HIDDEN
- * @see IResourceDeltaVisitor#visit(IResourceDelta)
- * @since 2.0
- */
- public void accept(IResourceDeltaVisitor visitor, int memberFlags) throws CoreException;
-
- /**
- * Finds and returns the descendent delta identified by the given path in this delta, or
- * null
if no such descendent exists. The supplied path may be absolute or relative; in
- * either case, it is interpreted as relative to this delta. Trailing separators are ignored. If
- * the path is empty this delta is returned.
- *
- * null
if no such descendent exists in the delta
- * @since 2.0
- */
- public IResourceDelta findMember(IPath path);
-
- /**
- * Returns resource deltas for all children of this resource which were added, removed, or
- * changed. Returns an empty array if there are no affected children.
- *
- *
- * getAffectedChildren(ADDED | REMOVED | CHANGED, IResource.NONE);
- *
- *
- * Team-private member resources are not included in the result; neither are phantom
- * resources.
- *
- * @return the resource deltas for all affected children
- * @see IResourceDelta#ADDED
- * @see IResourceDelta#REMOVED
- * @see IResourceDelta#CHANGED
- * @see #getAffectedChildren(int,int)
- */
- public IResourceDelta[] getAffectedChildren();
-
- /**
- * Returns resource deltas for all children of this resource whose kind is included in the given
- * mask. Kind masks are formed by the bitwise or of IResourceDelta
kind constants.
- * Returns an empty array if there are no affected children.
- *
- *
- * getAffectedChildren(kindMask, IResource.NONE);
- *
- *
- * Team-private member resources are not included in the result.
- *
- * @param kindMask a mask formed by the bitwise or of IResourceDelta
delta kind
- * constants
- * @return the resource deltas for all affected children
- * @see IResourceDelta#ADDED
- * @see IResourceDelta#REMOVED
- * @see IResourceDelta#CHANGED
- * @see IResourceDelta#ADDED_PHANTOM
- * @see IResourceDelta#REMOVED_PHANTOM
- * @see IResourceDelta#ALL_WITH_PHANTOMS
- * @see #getAffectedChildren(int,int)
- */
- public IResourceDelta[] getAffectedChildren(int kindMask);
-
- /**
- * Returns resource deltas for all children of this resource whose kind is included in the given
- * mask. Masks are formed by the bitwise or of IResourceDelta
kind constants. Returns
- * an empty array if there are no affected children.
- *
- * INCLUDE_TEAM_PRIVATE_MEMBERS
member flag is not specified,
- * (recommended), resource deltas involving team private member resources will be excluded. If the
- * INCLUDE_TEAM_PRIVATE_MEMBERS
member flag is specified, the result will also
- * include resource deltas of the specified kinds to team private member resources.
- *
- * IContainer.INCLUDE_PHANTOMS
member flag is equivalent to
- * including IContainer.ADDED_PHANTOM
and IContainer.REMOVED_PHANTOM
in
- * the kind mask.
- *
- * @param kindMask a mask formed by the bitwise or of IResourceDelta
delta kind
- * constants
- * @param memberFlags bit-wise or of member flag constants (IContainer.INCLUDE_PHANTOMS
- *
, IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS
and
- * IContainer.INCLUDE_HIDDEN
) indicating which members are of interest
- * @return the resource deltas for all affected children
- * @see IResourceDelta#ADDED
- * @see IResourceDelta#REMOVED
- * @see IResourceDelta#CHANGED
- * @see IResourceDelta#ADDED_PHANTOM
- * @see IResourceDelta#REMOVED_PHANTOM
- * @see IResourceDelta#ALL_WITH_PHANTOMS
- * @see IContainer#INCLUDE_PHANTOMS
- * @see IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS
- * @see IContainer#INCLUDE_HIDDEN
- * @since 2.0
- */
- public IResourceDelta[] getAffectedChildren(int kindMask, int memberFlags);
-
- /**
- * Returns flags which describe in more detail how a resource has been affected.
- *
- * CHANGED
, and also when
- * the resource is involved in a move:
- *
- *
- *
- *
- * The following code is only used if kind is CONTENT
- The bytes contained by the resource have been altered, or
- * IResource.touch
has been called on the resource.
- * DERIVED_CHANGED
- The derived flag of the resource has been altered.
- * ENCODING
- The encoding of the resource may have been altered. This flag is
- * not set when the encoding changes due to the file being modified, or being moved.
- * DESCRIPTION
- The description of the project has been altered, or
- * IResource.touch
has been called on the project. This flag is only valid for
- * project resources.
- * OPEN
- The project's open/closed state has changed. If it is not open, it
- * was closed, and vice versa. This flag is only valid for project resources.
- * TYPE
- The resource (a folder or file) has changed its type.
- * SYNC
- The resource's sync status has changed.
- * MARKERS
- The resource's markers have changed.
- * REPLACED
- The resource (and all its properties) was deleted (either by a
- * delete or move), and was subsequently re-created (either by a create, move, or copy).
- * LOCAL_CHANGED
- The resource is a linked resource, and the underlying file
- * system object has been added or removed.
- * REMOVED
(or CHANGED
in
- * conjunction with REPLACED
):
- *
- *
- *
- *
- * The following code is only used if kind is MOVED_TO
- The resource has moved. getMovedToPath
will return
- * the path of where it was moved to.
- * ADDED
(or CHANGED
in
- * conjunction with REPLACED
):
- *
- *
- *
- *
- * The following code is only used when describing potential changes using an {@link
- * IResourceChangeDescriptionFactory}:
- *
- * MOVED_FROM
- The resource has moved. getMovedFromPath
will
- * return the path of where it was moved from.
- *
- *
- *
- * A simple move operation would result in the following delta information. If a resource is moved
- * from A to B (with no other changes to A or B), then A will have kind COPIED_FROM
- Change constant (bit mask) indicating that the resource was
- * copied from another location. The location in the "before" state can be retrieved using
- * getMovedFromPath()
.
- * REMOVED
, with
- * flag MOVED_TO
, and getMovedToPath
on A will return the path for B. B
- * will have kind ADDED
, with flag MOVED_FROM
, and
- * getMovedFromPath
on B will return the path for A. B's other flags will describe any
- * other changes to the resource, as compared to its previous location at A.
- *
- * ADDED
, REMOVED
- *
, CHANGED
. When phantom resources have been explicitly requested, there are
- * two additional kinds: ADDED_PHANTOM
and REMOVED_PHANTOM
.
- *
- * @return the kind of this resource delta
- * @see IResourceDelta#ADDED
- * @see IResourceDelta#REMOVED
- * @see IResourceDelta#CHANGED
- * @see IResourceDelta#ADDED_PHANTOM
- * @see IResourceDelta#REMOVED_PHANTOM
- */
- public int getKind();
-
- /**
- * Returns the changes to markers on the corresponding resource. Returns an empty array if no
- * markers changed.
- *
- * @return the marker deltas
- */
- public IMarkerDelta[] getMarkerDeltas();
-
- /**
- * Returns the full path (in the "before" state) from which this resource (in the "after" state)
- * was moved. This value is only valid if the MOVED_FROM
change flag is set;
- * otherwise, null
is returned.
- *
- * null
- * @see #getMovedToPath()
- * @see #getFullPath()
- * @see #getFlags()
- */
- public IPath getMovedFromPath();
-
- /**
- * Returns the full path (in the "after" state) to which this resource (in the "before" state) was
- * moved. This value is only valid if the MOVED_TO
change flag is set; otherwise,
- * null
is returned.
- *
- * null
- * @see #getMovedFromPath()
- * @see #getFullPath()
- * @see #getFlags()
- */
- public IPath getMovedToPath();
-
- /**
- * Returns the project-relative path of this resource delta. Returns the empty path for projects
- * and the workspace root.
- *
- * ADDED
), this handle describes the newly-added resource; i.e.,
- * the one in the "after" state.
- *
- * CHANGED
), this handle also describes the resource in the "after"
- * state. When a file or folder resource has changed type, the former type of the handle can be
- * inferred.
- *
- * REMOVED
), this handle describes the resource in the "before"
- * state. Even though this resource would not normally exist in the current workspace, the type of
- * resource that was removed can be determined from the handle.
- *
- * ADDED_PHANTOM
and REMOVED_PHANTOM
- *
), this is the handle of the phantom resource.
- *
- * @return the affected resource (handle)
- */
- public IResource getResource();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceDeltaVisitor.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceDeltaVisitor.java
deleted file mode 100644
index a008f2174ea..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceDeltaVisitor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * class Visitor implements IResourceDeltaVisitor {
- * public boolean visit(IResourceDelta delta) {
- * switch (delta.getKind()) {
- * case IResourceDelta.ADDED :
- * // handle added resource
- * break;
- * case IResourceDelta.REMOVED :
- * // handle removed resource
- * break;
- * case IResourceDelta.CHANGED :
- * // handle changed resource
- * break;
- * }
- * return true;
- * }
- * }
- * IResourceDelta rootDelta = ...;
- * rootDelta.accept(new Visitor());
- *
- *
- * true
if the resource delta's children should be visited; false
- *
if they should be skipped.
- * @exception CoreException if the visit fails for some reason.
- */
- public boolean visit(IResourceDelta delta) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceFilterDescription.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceFilterDescription.java
deleted file mode 100644
index 1c034b88bb5..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceFilterDescription.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2008,
- * 2010 Freescale Semiconductor 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this filter could not be removed. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IContainer#getFilters()
- * @see IContainer#createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)
- */
- public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceProxy.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceProxy.java
deleted file mode 100644
index 1415755d604..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceProxy.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IResourceChangeEvent
for more details.
- * NULL_STAMP
if the resource either does not
- * exist or exists as a closed project
- * @see IResource#getModificationStamp()
- */
- public long getModificationStamp();
-
- /**
- * Returns whether the resource being visited is accessible.
- *
- * @return true
if the resource is accessible, and false
otherwise
- * @see IResource#isAccessible()
- */
- public boolean isAccessible();
-
- /**
- * Returns whether the resource being visited is derived.
- *
- * @return true
if the resource is marked as derived, and false
- * otherwise
- * @see IResource#isDerived()
- */
- public boolean isDerived();
-
- /**
- * Returns whether the resource being visited is a linked resource.
- *
- * @return true
if the resource is linked, and false
otherwise
- * @see IResource#isLinked()
- */
- public boolean isLinked();
-
- /**
- * Returns whether the resource being visited is a phantom resource.
- *
- * @return true
if the resource is a phantom resource, and false
- * otherwise
- * @see IResource#isPhantom()
- */
- public boolean isPhantom();
-
- /**
- * Returns whether the resource being visited is a hidden resource.
- *
- * @return true
if the resource is a hidden resource, and false
- * otherwise
- * @see IResource#isHidden()
- * @since 3.4
- */
- public boolean isHidden();
-
- /**
- * Returns whether the resource being visited is a team private member.
- *
- * @return true
if the resource is a team private member, and false
- * otherwise
- * @see IResource#isTeamPrivateMember()
- */
- public boolean isTeamPrivateMember();
-
- /**
- * Returns the simple name of the resource being visited.
- *
- * @return the name of the resource
- * @see IResource#getName()
- */
- public String getName();
-
- /**
- * Returns the value of the session property of the resource being visited, identified by the
- * given key. Returns null
if this resource has no such property.
- *
- * null
if the resource has no
- * such property
- * @see IResource#getSessionProperty(QualifiedName)
- */
- public Object getSessionProperty(QualifiedName key);
-
- /**
- * Returns the type of the resource being visited.
- *
- * @return the resource type
- * @see IResource#getType()
- */
- public int getType();
-
- /**
- * Returns the full workspace path of the resource being visited.
- *
- *
- * class Visitor implements IResourceProxyVisitor {
- * public boolean visit (IResourceProxy proxy) {
- * // your code here
- * return true;
- * }
- * }
- * ResourcesPlugin.getWorkspace().getRoot().accept(new Visitor(), IResource.NONE);
- *
- *
- * true
if the resource's members should be visited; false
if
- * they should be skipped
- * @exception CoreException if the visit fails for some reason.
- */
- public boolean visit(IResourceProxy proxy) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceRuleFactory.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceRuleFactory.java
deleted file mode 100644
index f1b6cf2fc5b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceRuleFactory.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * WorkspaceJob
or IWorkspaceRunnable
you can use
- * scheduling rules to lock a portion of the workspace for the duration of the job or runnable. If
- * you provide a non-null scheduling rule, a runtime exception will occur if you try to modify a
- * portion of the workspace that is not covered by the rule for the runnable or job.
- *
- * MultiRule.combine
- *
method. Simplifying a group of rules does not change the set of resources that are
- * covered, but can improve job scheduling performance.
- *
- * null
is a valid scheduling rule (indicating that no resources need to
- * be locked), and thus all methods in this class may return null
.
- *
- * @see WorkspaceJob
- * @see IWorkspace#run(IWorkspaceRunnable, ISchedulingRule, int,
- * org.eclipse.core.runtime.IProgressMonitor)
- * @see org.eclipse.core.runtime.jobs.MultiRule#combine(ISchedulingRule, ISchedulingRule)
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResourceRuleFactory {
- /**
- * Returns the scheduling rule that is required for creating a project, folder, or file.
- *
- * @param resource the resource being created
- * @return a scheduling rule, or null
- */
- public ISchedulingRule createRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for building a project or the entire workspace.
- *
- * @return a scheduling rule, or null
- */
- public ISchedulingRule buildRule();
-
- /**
- * Returns the scheduling rule that is required for changing the charset setting for a file or the
- * default charset setting for a container.
- *
- * @param resource the resource for which the charset will be changed
- * @return a scheduling rule, or null
- * @since 3.1
- */
- public ISchedulingRule charsetRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for changing the derived flag on a resource.
- *
- * @param resource the resource for which the derived flag will be changed
- * @return a scheduling rule, or null
- * @since 3.6
- */
- public ISchedulingRule derivedRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for copying a resource.
- *
- * @param source the source of the copy
- * @param destination the destination of the copy
- * @return a scheduling rule, or null
- */
- public ISchedulingRule copyRule(IResource source, IResource destination);
-
- /**
- * Returns the scheduling rule that is required for deleting a resource.
- *
- * @param resource the resource to be deleted
- * @return a scheduling rule, or null
- */
- public ISchedulingRule deleteRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for creating, modifying, or deleting markers on a
- * resource.
- *
- * @param resource the resource owning the marker to be modified
- * @return a scheduling rule, or null
- */
- public ISchedulingRule markerRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for modifying a resource. For files, modification
- * includes setting and appending contents. For projects, modification includes opening or closing
- * the project, or setting the project description using the {@link IResource#AVOID_NATURE_CONFIG}
- * flag. For all resources touch
is considered to be a modification.
- *
- * @param resource the resource being modified
- * @return a scheduling rule, or null
- */
- public ISchedulingRule modifyRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for moving a resource.
- *
- * @param source the source of the move
- * @param destination the destination of the move
- * @return a scheduling rule, or null
- */
- public ISchedulingRule moveRule(IResource source, IResource destination);
-
- /**
- * Returns the scheduling rule that is required for performing refreshLocal
on a
- * resource.
- *
- * @param resource the resource to refresh
- * @return a scheduling rule, or null
- */
- public ISchedulingRule refreshRule(IResource resource);
-
- /**
- * Returns the scheduling rule that is required for a validateEdit
- *
- * @param resources the resources to be validated
- * @return a scheduling rule, or null
- */
- public ISchedulingRule validateEditRule(IResource[] resources);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceStatus.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceStatus.java
deleted file mode 100644
index 72344a32524..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceStatus.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2010 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * ResourcesPlugin.PI_RESOURCES
) and one of these status codes.
- *
- * @see org.eclipse.core.runtime.IStatus
- * @see ResourcesPlugin#PI_RESOURCES
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IResourceStatus extends IStatus {
-
- /*
- * Status code definitions
- */
-
- // General constants [0-98]
- // Information Only [0-32]
- // Warnings [33-65]
- /**
- * Status code constant (value 35) indicating that a given nature set does not satisfy its
- * constraints. Severity: warning. Category: general.
- */
- public static final int INVALID_NATURE_SET = 35;
-
- // Errors [66-98]
-
- /**
- * Status code constant (value 75) indicating that a builder failed. Severity: error. Category:
- * general.
- */
- public static final int BUILD_FAILED = 75;
-
- /**
- * Status code constant (value 76) indicating that an operation failed. Severity: error. Category:
- * general.
- */
- public static final int OPERATION_FAILED = 76;
-
- /**
- * Status code constant (value 77) indicating an invalid value. Severity: error. Category:
- * general.
- */
- public static final int INVALID_VALUE = 77;
-
- // Local file system constants [200-298]
- // Information Only [200-232]
-
- // Warnings [233-265]
-
- /**
- * Status code constant (value 234) indicating that a project description file (.project), was
- * missing but it has been repaired. Severity: warning. Category: local file system.
- */
- public static final int MISSING_DESCRIPTION_REPAIRED = 234;
-
- /**
- * Status code constant (value 235) indicating the local file system location for a resource
- * overlaps the location of another resource. Severity: warning. Category: local file system.
- */
- public static final int OVERLAPPING_LOCATION = 235;
-
- // Errors [266-298]
-
- /**
- * Status code constant (value 268) indicating a resource unexpectedly exists on the local file
- * system. Severity: error. Category: local file system.
- */
- public static final int EXISTS_LOCAL = 268;
-
- /**
- * Status code constant (value 269) indicating a resource unexpectedly does not exist on the local
- * file system. Severity: error. Category: local file system.
- */
- public static final int NOT_FOUND_LOCAL = 269;
-
- /**
- * Status code constant (value 270) indicating the local file system location for a resource could
- * not be computed. Severity: error. Category: local file system.
- */
- public static final int NO_LOCATION_LOCAL = 270;
-
- /**
- * Status code constant (value 271) indicating an error occurred while reading part of a resource
- * from the local file system. Severity: error. Category: local file system.
- */
- public static final int FAILED_READ_LOCAL = 271;
-
- /**
- * Status code constant (value 272) indicating an error occurred while writing part of a resource
- * to the local file system. Severity: error. Category: local file system.
- */
- public static final int FAILED_WRITE_LOCAL = 272;
-
- /**
- * Status code constant (value 273) indicating an error occurred while deleting a resource from
- * the local file system. Severity: error. Category: local file system.
- */
- public static final int FAILED_DELETE_LOCAL = 273;
-
- /**
- * Status code constant (value 274) indicating the workspace view of the resource differs from
- * that of the local file system. The requested operation has been aborted to prevent the possible
- * loss of data. Severity: error. Category: local file system.
- */
- public static final int OUT_OF_SYNC_LOCAL = 274;
-
- /**
- * Status code constant (value 275) indicating this file system is not case sensitive and a
- * resource that differs only in case unexpectedly exists on the local file system. Severity:
- * error. Category: local file system.
- */
- public static final int CASE_VARIANT_EXISTS = 275;
-
- /**
- * Status code constant (value 276) indicating a file exists in the file system but is not of the
- * expected type (file instead of directory, or vice-versa). Severity: error. Category: local file
- * system.
- */
- public static final int WRONG_TYPE_LOCAL = 276;
-
- /**
- * Status code constant (value 277) indicating that the parent file in the file system is marked
- * as read-only. Severity: error. Category: local file system.
- *
- * @since 2.1
- */
- public static final int PARENT_READ_ONLY = 277;
-
- /**
- * Status code constant (value 278) indicating a file exists in the file system but its name is
- * not a valid resource name. Severity: error. Category: local file system.
- */
- public static final int INVALID_RESOURCE_NAME = 278;
-
- /**
- * Status code constant (value 279) indicating that the file in the file system is marked as
- * read-only. Severity: error. Category: local file system.
- *
- * @since 3.0
- */
- public static final int READ_ONLY_LOCAL = 279;
-
- // Workspace constants [300-398]
- // Information Only [300-332]
-
- // Warnings [333-365]
-
- /**
- * Status code constant (value 333) indicating that a workspace path variable unexpectedly does
- * not exist. Severity: warning. Category: workspace.
- *
- * @since 2.1
- */
- public static final int VARIABLE_NOT_DEFINED_WARNING = 333;
-
- // Errors [366-398]
-
- /**
- * Status code constant (value 366) indicating a resource exists in the workspace but is not of
- * the expected type. Severity: error. Category: workspace.
- */
- public static final int RESOURCE_WRONG_TYPE = 366;
-
- /**
- * Status code constant (value 367) indicating a resource unexpectedly exists in the workspace.
- * Severity: error. Category: workspace.
- */
- public static final int RESOURCE_EXISTS = 367;
-
- /**
- * Status code constant (value 368) indicating a resource unexpectedly does not exist in the
- * workspace. Severity: error. Category: workspace.
- */
- public static final int RESOURCE_NOT_FOUND = 368;
-
- /**
- * Status code constant (value 369) indicating a resource unexpectedly does not have content local
- * to the workspace. Severity: error. Category: workspace.
- */
- public static final int RESOURCE_NOT_LOCAL = 369;
-
- /**
- * Status code constant (value 370) indicating a workspace is unexpectedly closed. Severity:
- * error. Category: workspace.
- */
- public static final int WORKSPACE_NOT_OPEN = 370;
-
- /**
- * Status code constant (value 372) indicating a project is unexpectedly closed. Severity: error.
- * Category: workspace.
- */
- public static final int PROJECT_NOT_OPEN = 372;
-
- /**
- * Status code constant (value 374) indicating that the path of a resource being created is
- * occupied by an existing resource of a different type. Severity: error. Category: workspace.
- */
- public static final int PATH_OCCUPIED = 374;
-
- /**
- * Status code constant (value 375) indicating that the sync partner is not registered with the
- * workspace synchronizer. Severity: error. Category: workspace.
- */
- public static final int PARTNER_NOT_REGISTERED = 375;
-
- /**
- * Status code constant (value 376) indicating a marker unexpectedly does not exist in the
- * workspace tree. Severity: error. Category: workspace.
- */
- public static final int MARKER_NOT_FOUND = 376;
-
- /**
- * Status code constant (value 377) indicating a resource is unexpectedly not a linked resource.
- * Severity: error. Category: workspace.
- *
- * @since 2.1
- */
- public static final int RESOURCE_NOT_LINKED = 377;
-
- /**
- * Status code constant (value 378) indicating that linking is not permitted on a certain project.
- * Severity: error. Category: workspace.
- *
- * @since 2.1
- */
- public static final int LINKING_NOT_ALLOWED = 378;
-
- /**
- * Status code constant (value 379) indicating that a workspace path variable unexpectedly does
- * not exist. Severity: error. Category: workspace.
- *
- * @since 2.1
- */
- public static final int VARIABLE_NOT_DEFINED = 379;
-
- /**
- * Status code constant (value 380) indicating that an attempt was made to modify the workspace
- * while it was locked. Resource changes are disallowed during certain types of resource change
- * event notification. Severity: error. Category: workspace.
- *
- * @see IResourceChangeEvent
- * @since 2.1
- */
- public static final int WORKSPACE_LOCKED = 380;
-
- /**
- * Status code constant (value 381) indicating that a problem occurred while retrieving the
- * content description for a resource. Severity: error. Category: workspace.
- *
- * @see IFile#getContentDescription
- * @since 3.0
- */
- public static final int FAILED_DESCRIBING_CONTENTS = 381;
-
- /**
- * Status code constant (value 382) indicating that a problem occurred while setting the charset
- * for a resource. Severity: error. Category: workspace.
- *
- * @see IContainer#setDefaultCharset(String, IProgressMonitor)
- * @see IFile#setCharset(String, IProgressMonitor)
- * @since 3.0
- */
- public static final int FAILED_SETTING_CHARSET = 382;
-
- /**
- * Status code constant (value 383) indicating that a problem occurred while getting the charset
- * for a resource. Severity: error. Category: workspace.
- *
- * @since 3.0
- */
- public static final int FAILED_GETTING_CHARSET = 383;
-
- /**
- * Status code constant (value 384) indicating a build configuration with the specified ID
- * unexpectedly does not exist. Severity: error. Category: workspace.
- *
- * @since 3.7
- */
- public static final int BUILD_CONFIGURATION_NOT_FOUND = 384;
-
- // Internal constants [500-598]
- // Information Only [500-532]
-
- // Warnings [533-565]
-
- // Errors [566-598]
-
- /**
- * Status code constant (value 566) indicating an error internal to the platform has occurred.
- * Severity: error. Category: internal.
- */
- public static final int INTERNAL_ERROR = 566;
-
- /**
- * Status code constant (value 567) indicating the platform could not read some of its metadata.
- * Severity: error. Category: internal.
- */
- public static final int FAILED_READ_METADATA = 567;
-
- /**
- * Status code constant (value 568) indicating the platform could not write some of its metadata.
- * Severity: error. Category: internal.
- */
- public static final int FAILED_WRITE_METADATA = 568;
-
- /**
- * Status code constant (value 569) indicating the platform could not delete some of its metadata.
- * Severity: error. Category: internal.
- */
- public static final int FAILED_DELETE_METADATA = 569;
-
- /**
- * Returns the path of the resource associated with this status.
- *
- * @return the path of the resource related to this status
- */
- public IPath getPath();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceVisitor.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceVisitor.java
deleted file mode 100644
index eb6e69f4fea..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IResourceVisitor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * class Visitor implements IResourceVisitor {
- * public boolean visit(IResource res) {
- * // your code here
- * return true;
- * }
- * }
- * IResource root = ...;
- * root.accept(new Visitor());
- *
- *
- * true
if the resource's members should be visited; false
if
- * they should be skipped
- * @exception CoreException if the visit fails for some reason.
- */
- public boolean visit(IResource resource) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISaveContext.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISaveContext.java
deleted file mode 100644
index ae966504d04..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISaveContext.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * save
operations.
- *
- * IWorkspace.save
uses a different save context for each registered
- * participant, allowing each to declare whether they have actively participated and decide whether
- * to receive a resource delta on reactivation.
- *
- * @see IWorkspace#save(boolean, org.eclipse.core.runtime.IProgressMonitor)
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ISaveContext {
-
- /*====================================================================
- * Constants related to save kind
- *====================================================================*/
-
- /**
- * Type constant which identifies a full save.
- *
- * @see ISaveContext#getKind()
- */
- public static final int FULL_SAVE = 1;
-
- /**
- * Type constant which identifies a snapshot.
- *
- * @see ISaveContext#getKind()
- */
- public static final int SNAPSHOT = 2;
-
- /**
- * Type constant which identifies a project save.
- *
- * @see ISaveContext#getKind()
- */
- public static final int PROJECT_SAVE = 3;
-
- /**
- * Returns current files mapped with the ISaveContext.map
facility or an empty array
- * if there are no mapped files.
- *
- * @return the files currently mapped by the participant
- * @see #map(IPath, IPath)
- */
- public IPath[] getFiles();
-
- /**
- * Returns the type of this save. The types can be:
- *
- *
- *
- *
- * @return the type of the current save
- */
- public int getKind();
-
- /**
- * Returns the number for the previous save in which the plug-in actively participated, or ISaveContext.FULL_SAVE
- * ISaveContext.SNAPSHOT
- * ISaveContext.PROJECT_SAVE
- * 0
- *
if the plug-in has never actively participated in a save before.
- *
- * rollback
to.
- *
- * @return the previous save number if positive, or 0
if never saved before
- * @see ISaveParticipant#rollback(ISaveContext)
- */
- public int getPreviousSaveNumber();
-
- /**
- * If the current save is a project save, this method returns the project being saved.
- *
- * @return the project being saved or null
if this is not project save
- * @see #getKind()
- */
- public IProject getProject();
-
- /**
- * Returns the number for this save. This number is guaranteed to be 1
more than the
- * previous save number.
- *
- * null
if none.
- *
- * @return the location of a given file or null
- * @see #map(IPath, IPath)
- * @see ISavedState#lookup(IPath)
- */
- public IPath lookup(IPath file);
-
- /**
- * Maps the given plug-in file to its real location. This method is intended to be used with
- * ISaveContext.getSaveNumber()
to map plug-in configuration file names to real
- * locations.
- *
- * getPreviousSaveNumber
or by using getFiles
to
- * discover the current files and comparing that to the list of files on disk.
- *
- * @param file the logical name of the participant's data file
- * @param location the real (i.e., filesystem) name by which the file should be known for this
- * save, or null
to remove the entry
- * @see #lookup(IPath)
- * @see #getSaveNumber()
- * @see #needSaveNumber()
- * @see ISavedState#lookup(IPath)
- */
- public void map(IPath file, IPath location);
-
- /**
- * Indicates that the saved workspace tree should be remembered so that a delta will be available
- * in a subsequent session when the plug-in re-registers to participate in saves. If this method
- * is not called, no resource delta will be made available. This facility is not available for
- * marker deltas. Plug-ins must assume that all markers may have changed when they are activated.
- *
- * needSaveNumber
. That is, one can ask for a
- * delta regardless of whether or not one is an active participant.
- *
- * needDelta
. That is, one can be an active
- * participant whether or not one asks for a delta.
- *
- * @see IWorkspace#addSaveParticipant(org.eclipse.core.runtime.Plugin, ISaveParticipant)
- * @see ISavedState#getSaveNumber()
- */
- public void needSaveNumber();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISaveParticipant.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISaveParticipant.java
deleted file mode 100644
index 1a99e66fb9f..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISaveParticipant.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * saving
will be
- * next, followed by either doneSaving
or rollback
depending on whether
- * the workspace save was successful.
- *
- *
- *
- *
- * For instance, the Java IDE gathers various user preferences and would want to make sure that
- * the current settings are safe and sound after a save
(if not saved immediately).
- * The Java IDE would likely save computed image builder state on full saves, because this would
- * allow the Java IDE to be restarted later and not have to recompile the world at that time. On
- * the other hand, the Java IDE would not save the image builder state on a snapshot because that
- * information is non-essential; in the unlikely event of a crash, the image should be rebuilt
- * either from scratch or from the last saved state.
- *
- *
- * Plugin plugin = ...; // known
- * int saveNumber = context.getSaveNumber();
- * String saveFileName = "save-" + Integer.toString(saveNumber);
- * File f = plugin.getStateLocation().append(saveFileName).toFile();
- * plugin.writeImportantState(f);
- * context.map(new Path("save"), new Path(saveFileName));
- * context.needSaveNumber();
- * context.needDelta(); // optional
- *
- *
- * When the plug-in is reactivated in a subsequent workspace session, it needs to re-register to
- * participate in workspace saves. When it does so, it is handed back key information about what
- * state it had last saved. If it's interested, it can also ask for a resource delta describing
- * all resource changes that have happened since then, if this information is still available. The
- * following snippet shows what a participant plug-in would need to do if and when it is
- * reactivated:
- *
- *
- * IWorkspace ws = ...; // known
- * Plugin plugin = ...; // known
- * ISaveParticipant saver = ...; // known
- * ISavedState ss = ws.addSaveParticipant(plugin, saver);
- * if (ss == null) {
- * // activate for very first time
- * plugin.buildState();
- * } else {
- * String saveFileName = ss.lookup(new Path("save"));
- * File f = plugin.getStateLocation().append(saveFileName).toFile();
- * plugin.readImportantState(f);
- * IResourceChangeListener listener = new IResourceChangeListener() {
- * public void resourceChanged(IResourceChangeEvent event) {
- * IResourceDelta delta = event.getDelta();
- * if (delta != null) {
- * // fast reactivation using delta
- * plugin.updateState(delta);
- * } else {
- * // slower reactivation without benefit of delta
- * plugin.rebuildState();
- * }
- * };
- * ss.processResourceChangeEvents(listener);
- * }
- *
- *
- * @param context the save context object
- * @exception CoreException if this method fails
- * @see ISaveContext#getSaveNumber()
- */
- public void saving(ISaveContext context) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISavedState.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISavedState.java
deleted file mode 100644
index f89c14eadfd..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISavedState.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * 0
if the
- * plug-in has never actively participated in a successful save.
- *
- * @return the save number
- */
- public int getSaveNumber();
-
- /**
- * Returns the mapped location associated with the given path or null
if none.
- *
- * @return the mapped location of a given path
- * @see #getFiles()
- * @see ISaveContext#map(IPath, IPath)
- */
- public IPath lookup(IPath file);
-
- /**
- * Used to receive notification of changes that might have happened while this plug-in was not
- * active. The listener receives notifications of changes to the workspace resource tree since the
- * time this state was saved. After this method is run, the delta is forgotten. Subsequent calls
- * to this method will have no effect.
- *
- *
- *
- *
- * IFile
or IFileState
or any other object supplied by user code. The main
- * role of an IStorage
is to provide a uniform API for access to, and presentation of,
- * its content.
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * null
if none.
- */
- public IPath getFullPath();
-
- /**
- * Returns the name of this storage. The name of a storage is synonymous with the last segment of
- * its full path though if the storage does not have a path, it may still have a name.
- *
- * @return the name of the data represented by this storage, or null
if this storage
- * has no name
- * @see #getFullPath()
- */
- public String getName();
-
- /**
- * Returns whether this storage is read-only.
- *
- * @return true
if this storage is read-only
- */
- public boolean isReadOnly();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISynchronizer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISynchronizer.java
deleted file mode 100644
index b0389f50e5b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ISynchronizer.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * IResource.DEPTH_ZERO
, IResource.DEPTH_ONE
, or
- * IResource.DEPTH_INFINITE
.
- * @exception CoreException if this operation fails. Reasons include:
- *
- *
- */
- public void accept(QualifiedName partner, IResource start, IResourceVisitor visitor, int depth)
- throws CoreException;
-
- /**
- * Adds the named synchronization partner to this synchronizer's registry of partners. Once a
- * partner's name has been registered, sync information can be set and retrieve on resources
- * relative to the name. Adding a sync partner multiple times has no effect.
- *
- * @param partner the partner name to register
- * @see #remove(QualifiedName)
- */
- public void add(QualifiedName partner);
-
- /**
- * Discards the named partner's synchronization information associated with the specified resource
- * and its descendents to the specified depth.
- *
- * @param partner the sync partner name
- * @param resource the resource
- * @param depth the depth to which members of this resource should be visited. One of IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not
- * registered.
- *
- * IResource.DEPTH_ZERO
, IResource.DEPTH_ONE
, or
- * IResource.DEPTH_INFINITE
.
- * @exception CoreException if this operation fails. Reasons include:
- *
- *
- */
- public void flushSyncInfo(QualifiedName partner, IResource resource, int depth)
- throws CoreException;
-
- /**
- * Returns a list of synchronization partner names currently registered with this synchronizer.
- * Returns an empty array if there are no registered sync partners.
- *
- * @return a list of sync partner names
- */
- public QualifiedName[] getPartners();
-
- /**
- * Returns the named sync partner's synchronization information for the given resource. Returns
- * IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not
- * registered.
- * null
if no information is found.
- *
- * @param partner the sync partner name
- * @param resource the resource
- * @return the synchronization information, or null
if none
- * @exception CoreException if this operation fails. Reasons include:
- *
- *
- */
- public byte[] getSyncInfo(QualifiedName partner, IResource resource) throws CoreException;
-
- /**
- * Removes the named synchronization partner from this synchronizer's registry. Does nothing if
- * the partner is not registered. This discards all sync information for the defunct partner.
- * After a partner has been unregistered, sync information for it can no longer be stored on
- * resources.
- *
- * @param partner the partner name to remove from the registry
- * @see #add(QualifiedName)
- */
- public void remove(QualifiedName partner);
-
- /**
- * Sets the named sync partner's synchronization information for the given resource. If the given
- * info is non-IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not
- * registered.
- * null
and the resource neither exists nor is a phantom, this method
- * creates a phantom resource to hang on to the info. If the given info is null
, any
- * sync info for the resource stored by the given sync partner is discarded; in some cases, this
- * may result in the deletion of a phantom resource if there is no more sync info to maintain for
- * that resource.
- *
- * null
- * @exception CoreException if this operation fails. Reasons include:
- *
- *
- */
- public void setSyncInfo(QualifiedName partner, IResource resource, byte[] info)
- throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspace.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspace.java
deleted file mode 100644
index 7be4c51762b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspace.java
+++ /dev/null
@@ -1,1509 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IResourceStatus.PARTNER_NOT_REGISTERED
The sync partner is not
- * registered.
- * IResourceDelta
s), various forms of resource metadata
- * (e.g., markers and properties) as well as support for managing application/tool state (e.g.,
- * saving and restoring).
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IWorkspace extends IAdaptable {
- /**
- * flag constant (bit mask value 1) indicating that resource change notifications should be
- * avoided during the invocation of a compound resource changing operation.
- *
- * @see IWorkspace#run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor)
- * @since 3.0
- */
- public static final int AVOID_UPDATE = 1;
-
- /**
- * Constant that can be passed to {@link #validateEdit(org.eclipse.core.resources.IFile[],
- * Object)} to indicate that the caller does not have access to a UI context but would still like
- * to have UI-based validation if possible.
- *
- * @since 3.3
- * @see #validateEdit(IFile[], Object)
- */
- public static final Object VALIDATE_PROMPT = FileModificationValidationContext.VALIDATE_PROMPT;
-
- /**
- * The name of the IWorkspace OSGi service (value "org.eclipse.core.resources.IWorkspace").
- *
- * @since 3.5
- */
- public static final String SERVICE_NAME = IWorkspace.class.getName();
-
- /**
- * Adds the given listener for resource change events to this workspace. Has no effect if an
- * identical listener is already registered.
- *
- *
- * addResourceChangeListener(listener, IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.POST_CHANGE);
- *
- *
- * @param listener the listener
- * @see IResourceChangeListener
- * @see IResourceChangeEvent
- * @see #addResourceChangeListener(IResourceChangeListener, int)
- * @see #removeResourceChangeListener(IResourceChangeListener)
- */
- public void addResourceChangeListener(IResourceChangeListener listener);
-
- /**
- * Adds the given listener for the specified resource change events to this workspace. Has no
- * effect if an identical listener is already registered for these events. After completion of
- * this method, the given listener will be registered for exactly the specified events. If they
- * were previously registered for other events, they will be de-registered.
- *
- * IResourceChangeEvent
- *
. Clients are free to register for any number of event types however if they register
- * for more than one, it is their responsibility to ensure they correctly handle the case where
- * the same resource change shows up in multiple notifications. Clients are guaranteed to receive
- * only the events for which they are registered.
- *
- * @param listener the listener
- * @param eventMask the bit-wise OR of all event types of interest to the listener
- * @see IResourceChangeListener
- * @see IResourceChangeEvent
- * @see #removeResourceChangeListener(IResourceChangeListener)
- */
- public void addResourceChangeListener(IResourceChangeListener listener, int eventMask);
-
- /**
- * Registers the given plug-in's workspace save participant, and returns an object describing the
- * workspace state at the time of the last save in which the plug-in participated.
- *
- * null
if the
- * plug-in has not participated before
- * @exception CoreException if the method fails to add the participant. Reasons include:
- *
- *
- *
- * @see ISaveParticipant
- * @see #removeSaveParticipant(Plugin)
- * @deprecated Use {@link #addSaveParticipant(String, ISaveParticipant)} instead
- */
- @Deprecated
- public ISavedState addSaveParticipant(Plugin plugin, ISaveParticipant participant)
- throws CoreException;
-
- /**
- * Registers the given plug-in's workspace save participant, and returns an object describing the
- * workspace state at the time of the last save in which the bundle participated.
- *
- * null
if the
- * plug-in has not participated before
- * @exception CoreException if the method fails to add the participant. Reasons include:
- *
- *
- *
- * @see ISaveParticipant
- * @see #removeSaveParticipant(String)
- * @since 3.6
- */
- public ISavedState addSaveParticipant(String pluginId, ISaveParticipant participant)
- throws CoreException;
-
- /**
- * Builds all projects in this workspace. Projects are built in the order specified in this
- * workspace's description. Projects not mentioned in the order or for which the order cannot be
- * determined are built in an undefined order after all other projects have been built. If no
- * order is specified, the workspace computes an order determined by project references.
- *
- *
- *
- *
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if the build fails. The status contained in the exception may be a
- * generic {@link IResourceStatus#BUILD_FAILED} code, but it could also be any other status
- * code; it might also be a {@link MultiStatus}.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IWorkspace#build(IBuildConfiguration[], int, boolean, IProgressMonitor)
- * @see IProject#build(int, IProgressMonitor)
- * @see #computeProjectOrder(IProject[])
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IncrementalProjectBuilder#CLEAN_BUILD
- * @see IResourceRuleFactory#buildRule()
- */
- public void build(int kind, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Build the build configurations specified in the passed in build configuration array.
- *
- *
- *
- *
- * @param buildReferences boolean indicating if references should be transitively built.
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if the build fails. The status contained in the exception may be a
- * generic {@link IResourceStatus#BUILD_FAILED} code, but it could also be any other status
- * code; it might also be a {@link MultiStatus}.
- * @exception OperationCanceledException if the operation is canceled. Cancellation can occur even
- * if no progress monitor is provided.
- * @see IProject#build(int, IProgressMonitor)
- * @see IncrementalProjectBuilder#FULL_BUILD
- * @see IncrementalProjectBuilder#INCREMENTAL_BUILD
- * @see IncrementalProjectBuilder#CLEAN_BUILD
- * @see IResourceRuleFactory#buildRule()
- * @since 3.7
- */
- public void build(
- IBuildConfiguration[] buildConfigs,
- int kind,
- boolean buildReferences,
- IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Checkpoints the operation currently in progress. This method is used in the middle of a group
- * of operations to force a background autobuild (if the build argument is true) and send an
- * interim notification of resource change events.
- *
- * IWorkspace.run
method, this
- * method reports a single resource change event describing the net effect of all changes done to
- * resources since the last round of notifications. When the outermost run
method
- * eventually completes, it will do another autobuild (if enabled) and report the resource changes
- * made after this call.
- *
- *
- * IWorkspace.run
method.
- *
- * IWorkspace.computeProjectOrder
, which produces a more
- * usable result when there are cycles in project reference graph.
- */
- @Deprecated
- public IProject[][] computePrerequisiteOrder(IProject[] projects);
-
- /**
- * Data structure for holding the multi-part outcome of IWorkspace.computeProjectOrder
- *
.
- *
- * projects
field
- * @param hasCycles initial value of hasCycles
field
- * @param knots initial value of knots
field
- */
- public ProjectOrder(IProject[] projects, boolean hasCycles, IProject[][] knots) {
- this.projects = projects;
- this.hasCycles = hasCycles;
- this.knots = knots;
- }
-
- /**
- * A list of projects ordered so as to honor the project reference, and build configuration
- * reference, relationships between these projects wherever possible. The elements are a subset
- * of the ones passed as the projects
parameter to
- * IWorkspace.computeProjectOrder
, where inaccessible (closed or non-existent) projects
- * have been omitted.
- */
- public IProject[] projects;
- /**
- * Indicates whether any of the accessible projects in projects
are involved in
- * non-trivial cycles. true
if the reference graph contains at least one cycle
- * involving two or more of the projects in projects
, and false
if
- * none of the projects in projects
are involved in cycles.
- */
- public boolean hasCycles;
- /**
- * A list of knots in the project reference graph. This list is empty if the project reference
- * graph does not contain cycles. If the project reference graph contains cycles, each element
- * is a knot of two or more accessible projects from projects
that are involved in
- * a cycle of mutually dependent references.
- */
- public IProject[][] knots;
- }
-
- /**
- * Computes a total ordering of the given projects based on both static and dynamic project
- * references. If an existing and open project P references another existing and open project Q
- * also included in the list, then Q should come before P in the resulting ordering. Closed and
- * non-existent projects are ignored, and will not appear in the result. References to
- * non-existent or closed projects are also ignored, as are any self-references. The total
- * ordering is always consistent with the global total ordering of all open projects in the
- * workspace.
- *
- *
- * copy(resources, destination, (force ? IResource.FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @return a status object with code OK
if there were no problems; otherwise a
- * description (possibly a multi-status) consisting of low-severity warnings or informational
- * messages
- * @exception CoreException if the method fails to copy some resources. The status contained in
- * the exception may be a multi-status indicating where the individual failures occurred.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #copy(IResource[],IPath,int,IProgressMonitor)
- */
- public IStatus copy(
- IResource[] resources, IPath destination, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Copies the given sibling resources so that they are located as members of the resource at the
- * given path; the names of the copies are the same as the corresponding originals.
- *
- *
- * IResource.copy(IPath,int,IProgressMonitor)
, with "best effort" semantics:
- *
- *
- *
- *
- * null
if progress reporting is not desired
- * @return a status object with code OK
if there were no problems; otherwise a
- * description (possibly a multi-status) consisting of low-severity warnings or informational
- * messages
- * @exception CoreException if the method fails to copy some resources. The status contained in
- * the exception may be a multi-status indicating where the individual failures occurred.
- * Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#copy(IPath,int,IProgressMonitor)
- * @see IResourceRuleFactory#copyRule(IResource, IResource)
- * @since 2.0
- */
- public IStatus copy(
- IResource[] resources, IPath destination, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Deletes the given resources.
- *
- * FORCE
is not specified.
- * IResourceChangeEvent
for more details.
- *
- * delete(resources, IResource.KEEP_HISTORY | (force ? IResource.FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @return status with code OK
if there were no problems; otherwise a description
- * (possibly a multi-status) consisting of low-severity warnings or informational messages
- * @exception CoreException if the method fails to delete some resource. The status contained in
- * the exception is a multi-status indicating where the individual failures occurred.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #delete(IResource[],int,IProgressMonitor)
- */
- public IStatus delete(IResource[] resources, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Deletes the given resources.
- *
- *
- * IResource.delete(int,IProgressMonitor)
.
- *
- *
- *
- *
- * null
if progress reporting is not desired
- * @return status with code OK
if there were no problems; otherwise a description
- * (possibly a multi-status) consisting of low-severity warnings or informational messages
- * @exception CoreException if the method fails to delete some resource. The status contained in
- * the exception is a multi-status indicating where the individual failures occurred.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#delete(int,IProgressMonitor)
- * @see IResourceRuleFactory#deleteRule(IResource)
- * @since 2.0
- */
- public IStatus delete(IResource[] resources, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Removes the given markers from the resources with which they are associated. Markers that do
- * not exist are ignored.
- *
- *
- *
- *
- * @see IResourceRuleFactory#markerRule(IResource)
- */
- public void deleteMarkers(IMarker[] markers) throws CoreException;
-
- /**
- * Forgets any resource tree being saved for the plug-in with the given name. If the plug-in id is
- * IResourceChangeEvent
for more details.
- * null
, all trees are forgotten.
- *
- * ISaveContext.needDelta
in the process of a save indicates that it would like to be
- * fed the resource delta the next time it is reactivated. If a plug-in never gets reactivated (or
- * if it fails to successfully register to participate in workspace saves), the workspace
- * nevertheless retains the necessary information to generate the resource delta if asked. This
- * method allows such a long term leak to be plugged.
- *
- * @param pluginId the unique identifier of the plug-in, or null
- * @see ISaveContext#needDelta()
- */
- public void forgetSavedTree(String pluginId);
-
- /**
- * Returns all filter matcher descriptors known to this workspace. Returns an empty array if there
- * are no installed filter matchers.
- *
- * @return the filter matcher descriptors known to this workspace
- * @since 3.6
- */
- public IFilterMatcherDescriptor[] getFilterMatcherDescriptors();
-
- /**
- * Returns the filter descriptor with the given unique identifier, or null
if there
- * is no such filter.
- *
- * @param filterMatcherId the filter matcher extension identifier (e.g.
- * "com.example.coolFilter"
).
- * @return the filter matcher descriptor, or null
- * @since 3.6
- */
- public IFilterMatcherDescriptor getFilterMatcherDescriptor(String filterMatcherId);
-
- /**
- * Returns all nature descriptors known to this workspace. Returns an empty array if there are no
- * installed natures.
- *
- * @return the nature descriptors known to this workspace
- * @since 2.0
- */
- public IProjectNatureDescriptor[] getNatureDescriptors();
-
- /**
- * Returns the nature descriptor with the given unique identifier, or null
if there
- * is no such nature.
- *
- * @param natureId the nature extension identifier (e.g. "com.example.coolNature"
).
- * @return the nature descriptor, or null
- * @since 2.0
- */
- public IProjectNatureDescriptor getNatureDescriptor(String natureId);
-
- /**
- * Finds all dangling project references in this workspace. Projects which are not open are
- * ignored. Returns a map with one entry for each open project in the workspace that has at least
- * one dangling project reference; the value of the entry is an array of projects which are
- * referenced by that project but do not exist in the workspace. Returns an empty Map if there are
- * no projects in the workspace.
- *
- * @return a map (key type: IProject
, value type: IProject[]
) from
- * project to dangling project references
- */
- public MapIWorkspace.setDescription
needs
- * to be called. The workspace description values are store in the preference store.
- *
- * @return the workspace description
- * @see #setDescription(IWorkspaceDescription)
- */
- public IWorkspaceDescription getDescription();
-
- /**
- * Returns the root resource of this workspace.
- *
- * @return the workspace root
- */
- public IWorkspaceRoot getRoot();
-
- /**
- * Returns a factory for obtaining scheduling rules prior to modifying resources in the workspace.
- *
- * @see IResourceRuleFactory
- * @return a resource rule factory
- * @since 3.0
- */
- public IResourceRuleFactory getRuleFactory();
-
- /**
- * Returns the synchronizer for this workspace.
- *
- * @return the synchronizer
- * @see ISynchronizer
- */
- public ISynchronizer getSynchronizer();
-
- /**
- * Returns whether this workspace performs autobuilds.
- *
- * @return true
if autobuilding is on, false
otherwise
- */
- public boolean isAutoBuilding();
-
- /**
- * Returns whether the workspace tree is currently locked. Resource changes are disallowed during
- * certain types of resource change event notification. See IResourceChangeEvent
for
- * more details.
- *
- * @return boolean true
if the workspace tree is locked, false
otherwise
- * @see IResourceChangeEvent
- * @since 2.1
- */
- public boolean isTreeLocked();
-
- /**
- * Reads the project description file (".project") from the given location in the local file
- * system. This object is useful for discovering the correct name for a project before importing
- * it into the workspace.
- *
- *
- *
- *
- * move(resources, destination, IResource.KEEP_HISTORY | (force ? IResource.FORCE : IResource.NONE), monitor);
- *
- *
- * null
if progress reporting is not desired
- * @return status with code OK
if there were no problems; otherwise a description
- * (possibly a multi-status) consisting of low-severity warnings or informational messages.
- * @exception CoreException if the method fails to move some resources. The status contained in
- * the exception may be a multi-status indicating where the individual failures occurred.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #move(IResource[],IPath,int,IProgressMonitor)
- */
- public IStatus move(
- IResource[] resources, IPath destination, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Moves the given sibling resources so that they are located as members of the resource at the
- * given path; the names of the new members are the same.
- *
- * IResource.move
, with "best
- * effort" semantics:
- *
- *
- *
- *
- * force
flag has the same meaning as it does on the corresponding
- * single-resource method.
- * null
if progress reporting is not desired
- * @return status with code OK
if there were no problems; otherwise a description
- * (possibly a multi-status) consisting of low-severity warnings or informational messages.
- * @exception CoreException if the method fails to move some resources. The status contained in
- * the exception may be a multi-status indicating where the individual failures occurred.
- * Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#move(IPath,int,IProgressMonitor)
- * @see IResourceRuleFactory#moveRule(IResource, IResource)
- * @since 2.0
- */
- public IStatus move(
- IResource[] resources, IPath destination, int updateFlags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns a new build configuration for the project, with the given name. The name is a human
- * readable unique name for the build configuration in the project. The project need not exist.
- *
- * FORCE
is false
.
- * IResourceChangeEvent
for more details.
- * null
configuration name which will resolve to the referenced project's active
- * configuration when the reference is used.
- *
- *
- *
- *
- * null
scheduling rule is
- * supplied, this operation must always support cancelation in the case where this operation
- * becomes blocked by a long running background operation.
- *
- * AVOID_UPDATE
are ignored.
- *
- * @param action the action to perform
- * @param rule the scheduling rule to use when running this operation, or null
if
- * there are no scheduling restrictions for this operation.
- * @param flags bit-wise or of flag constants (only AVOID_UPDATE is relevant here)
- * @param monitor a progress monitor, or null
if progress reporting is not desired.
- * @exception CoreException if the operation failed.
- * @exception OperationCanceledException if the operation is canceled. If a non-null
- * scheduling rule is supplied, cancelation can occur even if no progress monitor is provided.
- * @see #AVOID_UPDATE
- * @see IResourceRuleFactory
- * @since 3.0
- */
- public void run(
- IWorkspaceRunnable action, ISchedulingRule rule, int flags, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Runs the given action as an atomic workspace operation.
- *
- *
- * workspace.run(action, workspace.getRoot(), IWorkspace.AVOID_UPDATE, monitor);
- *
- *
- * @param action the action to perform
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @exception CoreException if the operation failed.
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- */
- public void run(IWorkspaceRunnable action, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Saves this workspace's valuable state on disk. Consults with all registered plug-ins so that
- * they can coordinate the saving of their persistent state as well.
- *
- * full
parameter indicates whether a full save or a snapshot is being
- * requested. Snapshots save the workspace information that is considered hard to be recomputed in
- * the unlikely event of a crash. It includes parts of the workspace tree, workspace and projects
- * descriptions, markers and sync information. Full saves are heavy weight operations which save
- * the complete workspace state.
- *
- *
- * IWorkspace.run
invocation. Snapshots can be called any time and are interpreted by the
- * workspace as a hint that a snapshot is required. The workspace will perform the snapshot when
- * possible. Even as a hint, snapshots should only be called when necessary as they impact system
- * performance. Although saving does not change the workspace per se, its execution is serialized
- * like methods that write the workspace.
- *
- *
- *
- *
- * Resource-based plug-in also have data with varying degrees of importance. Each plug-in gets to
- * decide the policy for protecting its data, either immediately, never, or at save
- * save
- * save
- * save
- * time. For the latter, the plug-in coordinates its actions with the workspace (see
- * ISaveParticipant
for details).
- *
- * save
will be restored the next time the
- * workspace is reopened for the next session. Naturally, information that is written to disk
- * immediately will be as of the last time it was changed.
- *
- * IResourceChangeListener
). It is even
- * possible for a plug-in to find out about changes to resources that happen between workspace
- * sessions (see IWorkspace.addSaveParticipant
).
- *
- *
- *
- *
- * ISaveContext
object is created for each registered workspace
- * save participant plug-in, reflecting the kind of save (ISaveContext.getKind
- * ), the previous save number in which this plug-in actively participated, and the new save
- * number (= previous save number plus 1).
- * prepareToSave(context)
,
- * passing in its own context object.
- *
- *
- * If prepareToSave
fails (throws an exception), the problem is logged and the
- * participant is marked as unstable.
- * saving(context)
, passing in its own context object.
- *
- *
- * If context.getStateNumber()
and calls
- * context.needStateNumber()
to indicate that it has actively participated. If
- * upon reactivation the plug-in will want a resource delta covering all changes
- * between now and then, the plug-in should invoke context.needDelta()
to
- * request this now; otherwise, a resource delta for the intervening period will not
- * be available on reactivation.
- * saving
fails (throws an exception), the problem is logged and the
- * participant is marked as unstable.
- *
- *
- * doneSaving(context)
, passing in its own context object.
- *
- *
- * If doneSaving
fails (throws an exception), the problem is logged and
- * the participant is marked as unstable. (The state number in the save table is not
- * rolled back just because of this instability.)
- *
- *
- * rollback(context)
, passing in its own context object.
- *
- *
- * If rollback
fails (throws an exception), the problem is logged and the
- * participant is marked as unstable. (The state number in the save table is rolled
- * back anyway.)
- * true
if this is a full save, and false
if this is only a
- * snapshot for protecting against crashes
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return a status that may contain warnings, such as the failure of an individual participant
- * @exception CoreException if this method fails to save the state of this workspace. Reasons
- * include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see #addSaveParticipant(Plugin, ISaveParticipant)
- */
- public IStatus save(boolean full, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Sets the workspace description. Its values are stored in the preference store.
- *
- * @param description the new workspace description.
- * @see #getDescription()
- * @exception CoreException if the method fails. Reasons include:
- *
- *
- */
- public void setDescription(IWorkspaceDescription description) throws CoreException;
-
- /**
- * Returns a copy of the given set of natures sorted in prerequisite order. For each nature, it is
- * guaranteed that all of its prerequisites will precede it in the resulting array.
- *
- * validateEdit
on a file whenever
- * it finds itself in the following position: (a) the file is marked read-only, and (b) the client
- * believes it likely (not necessarily certain) that it will modify the file's contents at some
- * point. A case in point is an editor that has a buffer opened on a file. When the user starts to
- * dirty the buffer, the editor should check to see whether the file is read-only. If it is, it
- * should call validateEdit
, and can reasonably expect this call, when successful, to
- * cause the file to become read-write. An editor should also be sensitive to a file becoming
- * read-only again even after a successful validateEdit
(e.g., due to the user
- * checking in the file in a different view); the editor should again call validateEdit
- *
if the file is read-only before attempting to save the contents of the file.
- *
- * IFile.setContents
(or appendContents
) would be
- * successful on any of them. If the result is not OK, modifying the given files might not succeed
- * for the reason(s) indicated.
- *
- * null
is passed, the user should not be contacted; any failures should be
- * reported via the result; the caller may chose to present these to the user however they see
- * fit. The ideal implementation of this method is transactional; no files would be affected
- * unless the go-ahead could be given. (In practice, there may be no feasible way to ensure such
- * changes get done atomically.)
- *
- * FileModificationValidator.validateEdit
for the file
- * modification validator (if provided by the VCM plug-in). When there is no file modification
- * validator, this method returns a status with an IResourceStatus.READ_ONLY_LOCAL
- * code if one of the files is read-only, and a status with an IStatus.OK
code
- * otherwise.
- *
- * FileModificationValidator.validateEdit
to
- * interact with the UI context in an appropriate thread.
- *
- * @param files the files that are to be modified; these files must all exist in the workspace
- * @param context either {@link IWorkspace#VALIDATE_PROMPT}, or the
- * org.eclipse.swt.widgets.Shell
that is to be used to parent any dialogs with the
- * user, or null
if there is no UI context (declared as an Object
to
- * avoid any direct references on the SWT component)
- * @return a status object that is OK
if things are fine, otherwise a status
- * describing reasons why modifying the given files is not reasonable. A status with a
- * severity of CANCEL
is returned if the validation was canceled, indicating the
- * edit should not proceed.
- * @see IResourceRuleFactory#validateEditRule(IResource[])
- * @since 2.0
- */
- public IStatus validateEdit(IFile[] files, Object context);
-
- /**
- * Validates that the given resource will not (or would not, if the resource doesn't exist in the
- * workspace yet) be filtered out from the workspace by its parent resource filters.
- *
- * IStatus.ERROR
if the resource
- * will be filtered out - removed - out of the workspace by its parent resource filters.
- *
- * IStatus.OK
if the given resource is not filtered
- * by its parent resource filters, otherwise a status object with severity IStatus.ERROR
- *
indicating that it will
- * @see IStatus#OK
- * @since 3.6
- */
- public IStatus validateFiltered(IResource resource);
-
- /**
- * Validates the given path as the location of the given resource on disk. The path must be either
- * an absolute file system path, or a relative path whose first segment is the name of a defined
- * workspace path variable. In addition to the restrictions for paths in general (see IPath.
- * isValidPath
), a link location must also obey the following rules:
- *
- *
- *
- *
- *
- *
- *
- *
- * ResourcesPlugin.PREF_DISABLE_LINKING
must not be set to "true".
- * IStatus.ERROR
if the location
- * does not obey the above rules. Also, this method will return a status with severity
- * IStatus.WARNING
if the location overlaps the location of any existing resource in the
- * workspace.
- *
- * IStatus.OK
if the given location is valid as the
- * linked resource location, otherwise a status object with severity IStatus.WARNING
- *
or IStatus.ERROR
indicating what is wrong with the location
- * @see IStatus#OK
- * @see ResourcesPlugin#PREF_DISABLE_LINKING
- * @since 2.1
- */
- public IStatus validateLinkLocation(IResource resource, IPath location);
-
- /**
- * Validates the given {@link URI} as the location of the given resource on disk. The location
- * must be either an absolute URI, or a relative URI whose first segment is the name of a defined
- * workspace path variable. A link location must obey the following rules:
- *
- *
- *
- *
- *
- *
- *
- *
- * ResourcesPlugin.PREF_DISABLE_LINKING
must not be set to "true".
- * IStatus.ERROR
if the location
- * does not obey the above rules. Also, this method will return a status with severity
- * IStatus.WARNING
if the location overlaps the location of any existing resource in the
- * workspace.
- *
- * IStatus.OK
if the given location is valid as the
- * linked resource location, otherwise a status object with severity IStatus.WARNING
- *
or IStatus.ERROR
indicating what is wrong with the location
- * @see IStatus#OK
- * @see ResourcesPlugin#PREF_DISABLE_LINKING
- * @since 3.2
- */
- public IStatus validateLinkLocationURI(IResource resource, URI location);
-
- /**
- * Validates the given string as the name of a resource valid for one of the given types.
- *
- * FILE
,FOLDER
- *
,PROJECT
or ROOT
) indicating expected resource type(s)
- * @return a status object with code IStatus.OK
if the given string is valid as a
- * resource name, otherwise a status object indicating what is wrong with the string
- * @see IResource#PROJECT
- * @see IResource#FOLDER
- * @see IResource#FILE
- * @see IStatus#OK
- */
- public IStatus validateName(String segment, int typeMask);
-
- /**
- * Validates that each of the given natures exists, and that all nature constraints are satisfied
- * within the given set.
- *
- *
- *
- *
- * IStatus.OK
if the given set of natures is valid,
- * otherwise a status object indicating what is wrong with the set
- * @since 2.0
- */
- public IStatus validateNatureSet(String[] natureIds);
-
- /**
- * Validates the given string as a path for a resource of the given type(s).
- *
- * IPath.isValidPath
), a
- * resource path should also obey the following rules:
- *
- *
- *
- *
- * validateName
- * FILE
,FOLDER
- *
,PROJECT
, or ROOT
) indicating expected resource type(s)
- * @return a status object with code IStatus.OK
if the given path is valid as a
- * resource path, otherwise a status object indicating what is wrong with the string
- * @see IResource#PROJECT
- * @see IResource#FOLDER
- * @see IResource#FILE
- * @see IStatus#OK
- * @see IResourceStatus#getPath()
- */
- public IStatus validatePath(String path, int typeMask);
-
- /**
- * Validates the given path as the location of the given project on disk. The path must be either
- * an absolute file system path, or a relative path whose first segment is the name of a defined
- * workspace path variable. In addition to the restrictions for paths in general (see IPath.
- * isValidPath
), a location path should also obey the following rules:
- *
- *
- *
- *
- * null
if non
- * default project location is validated
- * @param location the location of the project contents on disk, or null
if the
- * default project location is used
- * @return a status object with code IStatus.OK
if the given location is valid as the
- * project content location, otherwise a status object indicating what is wrong with the
- * location
- * @see IProjectDescription#getLocationURI()
- * @see IProjectDescription#setLocation(IPath)
- * @see IStatus#OK
- */
- public IStatus validateProjectLocation(IProject project, IPath location);
-
- /**
- * Validates the given URI as the location of the given project. The location must be either an
- * absolute URI, or a relative URI whose first segment is the name of a defined workspace path
- * variable. A project location must obey the following rules:
- *
- *
- *
- *
- * null
if non
- * default project location is validated
- * @param location the location of the project contents on disk, or null
if the
- * default project location is used
- * @return a status object with code IStatus.OK
if the given location is valid as the
- * project content location, otherwise a status object indicating what is wrong with the
- * location
- * @see IProjectDescription#getLocationURI()
- * @see IProjectDescription#setLocationURI(URI)
- * @see IStatus#OK
- * @since 3.2
- */
- public IStatus validateProjectLocationURI(IProject project, URI location);
-
- /**
- * Returns the path variable manager for this workspace.
- *
- * @return the path variable manager
- * @see IPathVariableManager
- * @since 2.1
- */
- public IPathVariableManager getPathVariableManager();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceDescription.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceDescription.java
deleted file mode 100644
index 46519262257..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceDescription.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2009 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * ResourcesPlugin
class.
- *
- * @see IWorkspace#getDescription()
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see IWorkspace#newProjectDescription(String)
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IWorkspaceDescription {
- /**
- * Returns the order in which projects in the workspace should be built. The returned value is
- * null
if the workspace's default build order is being used.
- *
- * @return the names of projects in the order they will be built, or null
if the
- * default build order should be used
- * @see #setBuildOrder(String[])
- * @see ResourcesPlugin#PREF_BUILD_ORDER
- */
- public String[] getBuildOrder();
-
- /**
- * Returns the maximum length of time, in milliseconds, a file state should be kept in the local
- * history. This setting is ignored by the workspace when isApplyFileStatePolicy()
- * returns false
.
- *
- * @return the maximum time a file state should be kept in the local history represented in
- * milliseconds
- * @see #setFileStateLongevity(long)
- * @see #isApplyFileStatePolicy()
- * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY
- */
- public long getFileStateLongevity();
-
- /**
- * Returns the maximum number of times that the workspace should rebuild when builders affect
- * projects that have already been built.
- *
- * @return the maximum number of times that the workspace should rebuild when builders affect
- * projects that have already been built.
- * @see #setMaxBuildIterations(int)
- * @see ResourcesPlugin#PREF_MAX_BUILD_ITERATIONS
- * @since 2.1
- */
- public int getMaxBuildIterations();
-
- /**
- * Returns the maximum number of states per file that can be stored in the local history. This
- * setting is ignored by the workspace when isApplyFileStatePolicy()
returns
- * false
.
- *
- * @return the maximum number of states per file that can be stored in the local history
- * @see #setMaxFileStates(int)
- * @see #isApplyFileStatePolicy()
- * @see ResourcesPlugin#PREF_MAX_FILE_STATES
- */
- public int getMaxFileStates();
-
- /**
- * Returns the maximum permitted size of a file, in bytes, to be stored in the local history. This
- * setting is ignored by the workspace when isApplyFileStatePolicy()
returns
- * false
.
- *
- * @return the maximum permitted size of a file to be stored in the local history
- * @see #setMaxFileStateSize(long)
- * @see #isApplyFileStatePolicy()
- * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE
- */
- public long getMaxFileStateSize();
-
- /**
- * Returns whether file states are discarded according to the policy specified by
- * setFileStateLongevity(long)
, setMaxFileStates(int)
and
- * setMaxFileStateSize(long)
methods.
- *
- * @return true
if file states are removed due to the policy, false
- * otherwise
- * @see #setApplyFileStatePolicy(boolean)
- * @see #setFileStateLongevity(long)
- * @see #setMaxFileStates(int)
- * @see #setMaxFileStateSize(long)
- * @see ResourcesPlugin#PREF_APPLY_FILE_STATE_POLICY
- * @since 3.6
- */
- public boolean isApplyFileStatePolicy();
-
- /**
- * Returns the interval between automatic workspace snapshots.
- *
- * @return the amount of time in milliseconds between automatic workspace snapshots
- * @see #setSnapshotInterval(long)
- * @see ResourcesPlugin#PREF_SNAPSHOT_INTERVAL
- * @since 2.0
- */
- public long getSnapshotInterval();
-
- /**
- * Returns whether this workspace performs autobuilds.
- *
- * @return true
if autobuilding is on, otherwise false
- * @see #setAutoBuilding(boolean)
- * @see ResourcesPlugin#PREF_AUTO_BUILDING
- */
- public boolean isAutoBuilding();
-
- /**
- * Records whether this workspace performs autobuilds.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param value true
to turn on autobuilding, and false
to turn it off
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #isAutoBuilding()
- * @see ResourcesPlugin#PREF_AUTO_BUILDING
- */
- public void setAutoBuilding(boolean value);
-
- /**
- * Sets the order in which projects in the workspace should be built. Projects not named in this
- * list are built in a default order defined by the workspace. Set this value to null
- * to use the default ordering for all projects. Projects not named in the list are built in
- * unspecified order after all ordered projects.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param value the names of projects in the order in which they are built, or null
- * to use the workspace's default order for all projects
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #getBuildOrder()
- * @see ResourcesPlugin#PREF_BUILD_ORDER
- */
- public void setBuildOrder(String[] value);
-
- /**
- * Sets the maximum time, in milliseconds, a file state should be kept in the local history. This
- * setting is ignored by the workspace when setApplyFileStatePolicy(boolean)
- *
is set to false.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param time the maximum number of milliseconds a file state should be kept in the local history
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #getFileStateLongevity()
- * @see #setApplyFileStatePolicy(boolean)
- * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY
- */
- public void setFileStateLongevity(long time);
-
- /**
- * Sets the maximum number of times that the workspace should rebuild when builders affect
- * projects that have already been built.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param number the maximum number of times that the workspace should rebuild when builders
- * affect projects that have already been built.
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #getMaxBuildIterations()
- * @see ResourcesPlugin#PREF_MAX_BUILD_ITERATIONS
- * @since 2.1
- */
- public void setMaxBuildIterations(int number);
-
- /**
- * Sets the maximum number of states per file that can be stored in the local history. If the
- * maximum number is reached, older states are removed in favor of new ones. This setting is
- * ignored by the workspace when setApplyFileStatePolicy(boolean)
- *
is set to false
.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param number the maximum number of states per file that can be stored in the local history
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #getMaxFileStates()
- * @see #setApplyFileStatePolicy(boolean)
- * @see ResourcesPlugin#PREF_MAX_FILE_STATES
- */
- public void setMaxFileStates(int number);
-
- /**
- * Sets the maximum permitted size of a file, in bytes, to be stored in the local history. This
- * setting is ignored by the workspace when setApplyFileStatePolicy(boolean)
- *
is set to false
.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param size the maximum permitted size of a file to be stored in the local history
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #getMaxFileStateSize()
- * @see #setApplyFileStatePolicy(boolean)
- * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE
- */
- public void setMaxFileStateSize(long size);
-
- /**
- * Sets whether file states are discarded according to the policy specified by
- * setFileStateLongevity(long)
, setMaxFileStates(int)
and
- * setMaxFileStateSize(long)
methods.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param apply true
if file states are removed due to the policy, false
- * otherwise
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #setFileStateLongevity(long)
- * @see #setMaxFileStates(int)
- * @see #setMaxFileStateSize(long)
- * @see #isApplyFileStatePolicy()
- * @see ResourcesPlugin#PREF_APPLY_FILE_STATE_POLICY
- * @since 3.6
- */
- public void setApplyFileStatePolicy(boolean apply);
-
- /**
- * Sets the interval between automatic workspace snapshots. The new interval will only take effect
- * after the next snapshot.
- *
- * IWorkspace.setDescription
before changes made to this
- * description take effect.
- *
- * @param delay the amount of time in milliseconds between automatic workspace snapshots
- * @see IWorkspace#setDescription(IWorkspaceDescription)
- * @see #getSnapshotInterval()
- * @see ResourcesPlugin#PREF_SNAPSHOT_INTERVAL
- * @since 2.0
- */
- public void setSnapshotInterval(long delay);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceRoot.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceRoot.java
deleted file mode 100644
index e2c9f0c17da..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/IWorkspaceRoot.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- *
- *
- * IAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @see Platform#getAdapterManager()
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IWorkspaceRoot extends IContainer, IAdaptable {
-
- /**
- * Deletes everything in the workspace except the workspace root resource itself.
- *
- *
- * delete(
- * (deleteContent ? IResource.ALWAYS_DELETE_PROJECT_CONTENT : IResource.NEVER_DELETE_PROJECT_CONTENT )
- * | (force ? FORCE : IResource.NONE),
- * monitor);
- *
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- *
- * @exception OperationCanceledException if the operation is canceled. Cancelation can occur even
- * if no progress monitor is provided.
- * @see IResource#delete(int,IProgressMonitor)
- */
- public void delete(boolean deleteContent, boolean force, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns the handles to all the resources (workspace root, project, folder) in the workspace
- * which are mapped to the given path in the local file system. Returns an empty array if there
- * are none.
- *
- * IResourceChangeEvent
for more details.
- * ROOT
.
- *
- *
- * PROJECT
, along with any linked folders that share the same location. Otherwise the
- * resulting array will contain folders (type FOLDER
).
- *
- * ROOT
.
- *
- *
- * PROJECT
, along with any linked folders that share the same location. Otherwise the
- * resulting array will contain folders (type FOLDER
).
- *
- *
- * findContainersForLocationURI(location, IResource.NONE)
.
- *
- * @param location a URI path into some file system
- * @return the corresponding containers in the workspace, or an empty array if none
- * @since 3.2
- */
- public IContainer[] findContainersForLocationURI(URI location);
-
- /**
- * Returns the handles to all the resources (workspace root, project, folder) in the workspace
- * which are mapped to the given URI. Returns an empty array if there are none.
- *
- *
- * findFilesForLocationURI(location, IResource.NONE)
.
- *
- * @param location a URI path into some file system
- * @return the corresponding files in the workspace, or an empty array if none
- * @since 3.2
- */
- public IFile[] findFilesForLocationURI(URI location);
-
- /**
- * Returns the handles of all files that are mapped to the given URI. Returns an empty array if
- * there are none. The URI must be absolute; its path segments need not be valid names. The
- * resulting files may not currently exist.
- *
- * null
if none. If the path maps to the platform working
- * location, the returned object will be of type ROOT
. If the path maps to a project,
- * the resulting object will be of type PROJECT
; otherwise the resulting object will
- * be a folder (type FOLDER
). The path should be absolute; a relative path will be
- * treated as absolute. The path segments need not be valid names; a trailing separator is
- * ignored. The resulting resource may not currently exist.
- *
- * findContainersForLocation
.
- *
- * @param location a path in the local file system
- * @return the corresponding project or folder in the workspace, or null
if none
- */
- public IContainer getContainerForLocation(IPath location);
-
- /**
- * Returns a handle to the file which is mapped to the given path in the local file system, or
- * null
if none. The path should be absolute; a relative path will be treated as
- * absolute. The path segments need not be valid names. The resulting file may not currently
- * exist.
- *
- * findFilesForLocation
.
- *
- * @param location a path in the local file system
- * @return the corresponding file in the workspace, or null
if none
- */
- public IFile getFileForLocation(IPath location);
-
- /**
- * Returns a handle to the project resource with the given name which is a child of this root. The
- * given name must be a valid path segment as defined by {@link IPath#isValidSegment(String)}.
- *
- * getProjects(IResource.NONE)
.
- * Hidden projects are not included.
- *
- * @return an array of projects
- * @see #getProject(String)
- * @see IResource#isHidden()
- */
- public IProject[] getProjects();
-
- /**
- * Returns the collection of projects which exist under this root. The projects can be open or
- * closed.
- *
- * IWorkspaceRunnable
- *
interface should be implemented by any class whose instances are intended to be run by
- * IWorkspace.run
.
- *
- * OperationCanceledException
.
- *
- * @param monitor a progress monitor, or null
if progress reporting and cancellation
- * are not desired
- * @exception CoreException if this operation fails.
- */
- public void run(IProgressMonitor monitor) throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ProjectScope.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ProjectScope.java
deleted file mode 100644
index 21c45bcd3c6..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ProjectScope.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * org.eclipse.core.runtime.IPreferencesService
APIs) or for determining the correct
- * preference node to set values in the store.
- *
- * IProject#getLocation
.
- *
- *
- * /project/<projectName>/<qualifier>
- *
- * "project"
) used for the scope name for this preference
- * scope.
- */
- public static final String SCOPE = "project"; // $NON-NLS-1$
-
- private static ConcurrentHashMapnull
.
- *
- * @param context the project
- * @exception IllegalArgumentException if the project is null
- */
- public ProjectScope(IProject context) {
- super();
- if (context == null) throw new IllegalArgumentException();
- this.context = context;
- }
-
- /*
- * @see org.eclipse.core.runtime.IScopeContext#getNode(java.lang.String)
- */
- public IEclipsePreferences getNode(String qualifier) {
- if (qualifier == null) throw new IllegalArgumentException();
-
- if (!cache.containsKey(context.getName())) {
- synchronized (ProjectScope.class) {
- if (!cache.containsKey(context.getName())) {
- String pathToWorkspace = ResourcesPlugin.getPathToWorkspace();
- IPath fullPath = context.getFullPath();
- cache.putIfAbsent(
- context.getName(),
- new ChePreferences(pathToWorkspace + fullPath + "/.che/project.preferences"));
- }
- }
- }
- return cache.get(context.getName());
- }
-
- /*
- * @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
- */
- public IPath getLocation() {
- IProject project = ((IResource) context).getProject();
- IPath location = project.getLocation();
- return location == null
- ? null
- : location.append(EclipsePreferences.DEFAULT_PREFERENCES_DIRNAME);
- }
-
- /*
- * @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
- */
- public String getName() {
- return SCOPE;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (!super.equals(obj)) return false;
- if (!(obj instanceof ProjectScope)) return false;
- ProjectScope other = (ProjectScope) obj;
- return context.equals(other.context);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- return super.hashCode() + context.getFullPath().hashCode();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ResourceAttributes.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ResourceAttributes.java
deleted file mode 100644
index 306009f2451..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ResourceAttributes.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2014 Red Hat Incorporated 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 http://www.eclipse.org/org/documents/epl-v10.html
- *
- * ResourceAttributes
. */
- public ResourceAttributes() {
- super();
- }
-
- /**
- * Returns whether this ResourceAttributes object is marked archive.
- *
- * true
if this resource is marked archive, false
otherwise
- * @see #setArchive(boolean)
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_ARCHIVE
- */
- public boolean isArchive() {
- return (attributes & EFS.ATTRIBUTE_ARCHIVE) != 0;
- }
-
- /**
- * Returns whether this ResourceAttributes object is marked executable.
- *
- * true
if this resource is marked executable, false
otherwise
- * @see #setExecutable(boolean)
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_EXECUTABLE
- */
- public boolean isExecutable() {
- return (attributes & EFS.ATTRIBUTE_EXECUTABLE) != 0;
- }
-
- /**
- * Returns whether this ResourceAttributes object is marked hidden.
- *
- * true
if this resource is marked hidden, false
otherwise
- * @see #setHidden(boolean)
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_HIDDEN
- * @since 3.2
- */
- public boolean isHidden() {
- return (attributes & EFS.ATTRIBUTE_HIDDEN) != 0;
- }
-
- /**
- * Returns whether this ResourceAttributes object is marked read only.
- *
- * true
if this resource is marked as read only, false
otherwise
- * @see #setReadOnly(boolean)
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_READ_ONLY
- */
- public boolean isReadOnly() {
- return (attributes & EFS.ATTRIBUTE_READ_ONLY) != 0;
- }
-
- /**
- * Returns whether this ResourceAttributes object is marked as symbolic link.
- *
- * true
if this resource is marked as symbolic link, false
- * otherwise
- * @see #setSymbolicLink(boolean)
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_SYMLINK
- * @since 3.4
- */
- public boolean isSymbolicLink() {
- return (attributes & EFS.ATTRIBUTE_SYMLINK) != 0;
- }
-
- /**
- * Sets or unsets whether this ResourceAttributes object is marked archive.
- *
- * true
to set it to be archive, false
to unset
- * @see #isArchive()
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_ARCHIVE
- */
- public void setArchive(boolean archive) {
- set(EFS.ATTRIBUTE_ARCHIVE, archive);
- }
-
- /**
- * Clears all of the bits indicated by the mask.
- *
- * @nooverride This method is not intended to be re-implemented or extended by clients.
- * @noreference This method is not intended to be referenced by clients.
- */
- public void set(int mask, boolean value) {
- if (value) attributes |= mask;
- else attributes &= ~mask;
- }
-
- /**
- * Returns whether this ResourceAttributes object has the given mask set.
- *
- * @nooverride This method is not intended to be re-implemented or extended by clients.
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean isSet(int mask) {
- return (attributes & mask) != 0;
- }
-
- /**
- * Sets or unsets whether this ResourceAttributes object is marked executable.
- *
- * true
to set it to be executable, false
to unset
- * @see #isExecutable()
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_EXECUTABLE
- */
- public void setExecutable(boolean executable) {
- set(EFS.ATTRIBUTE_EXECUTABLE, executable);
- }
-
- /**
- * Sets or unsets whether this ResourceAttributes object is marked hidden
- *
- * true
to set it to be marked hidden, false
to unset
- * @see #isHidden()
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_HIDDEN
- * @since 3.2
- */
- public void setHidden(boolean hidden) {
- set(EFS.ATTRIBUTE_HIDDEN, hidden);
- }
-
- /**
- * Sets or unsets whether this ResourceAttributes object is marked read only.
- *
- * true
to set it to be marked read only, false
to unset
- * @see #isReadOnly()
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_READ_ONLY
- */
- public void setReadOnly(boolean readOnly) {
- set(EFS.ATTRIBUTE_READ_ONLY, readOnly);
- }
-
- /**
- * Sets or unsets whether this ResourceAttributes object is marked as symbolic link.
- *
- * true
to set it to be marked as symbolic link, false
to
- * unset
- * @see #isSymbolicLink()
- * @see IFileSystem#attributes()
- * @see EFS#ATTRIBUTE_SYMLINK
- * @since 3.4
- */
- public void setSymbolicLink(boolean symLink) {
- set(EFS.ATTRIBUTE_SYMLINK, symLink);
- }
-
- /** Returns a string representation of the attributes, suitable for debugging purposes only. */
- @Override
- public String toString() {
- return "ResourceAttributes(" + attributes + ')'; // $NON-NLS-1$
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ResourcesPlugin.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ResourcesPlugin.java
deleted file mode 100644
index 1b1075686e0..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/ResourcesPlugin.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2017 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * "org.eclipse.core.resources"
) for the standard
- * Resources plug-in.
- */
- public static final String PI_RESOURCES = "org.eclipse.core.resources"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring whether the workspace performs auto- refresh. Auto-refresh
- * installs a file-system listener, or performs periodic file-system polling to actively discover
- * changes in the resource hierarchy.
- *
- * @since 3.0
- */
- public static final String PREF_AUTO_REFRESH = "refresh.enabled"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring whether out-of-sync resources are automatically
- * asynchronously refreshed, when discovered to be out-of-sync by the workspace.
- *
- *
- * System.getProperty("file.encoding")
. There is also a convenience method
- * getEncoding
which returns the value of this preference, or the file system encoding if
- * this preference is not set.
- *
- * UnsupportedEncodingException
where this encoding is used.
- *
- * @see #getEncoding()
- * @see java.io.UnsupportedEncodingException
- */
- public static final String PREF_ENCODING = "encoding"; // $NON-NLS-1$
-
- private static final Logger LOG = LoggerFactory.getLogger(ResourcesPlugin.class);
- /**
- * Common prefix for workspace preference names.
- *
- * @since 2.1
- */
- private static final String PREF_DESCRIPTION_PREFIX = "description."; // $NON-NLS-1$
-
- /**
- * Name of a preference for configuring whether the workspace performs auto- builds.
- *
- * @see IWorkspaceDescription#isAutoBuilding()
- * @see IWorkspaceDescription#setAutoBuilding(boolean)
- * @since 2.1
- */
- public static final String PREF_AUTO_BUILDING =
- PREF_DESCRIPTION_PREFIX + "autobuilding"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring the maximum number of times that the workspace should
- * rebuild when builders affect projects that have already been built.
- *
- * @see IWorkspaceDescription#getMaxBuildIterations()
- * @see IWorkspaceDescription#setMaxBuildIterations(int)
- * @since 2.1
- */
- public static final String PREF_MAX_BUILD_ITERATIONS =
- PREF_DESCRIPTION_PREFIX + "maxbuilditerations"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring whether to apply the specified history size policy.
- *
- * @see IWorkspaceDescription#isApplyFileStatePolicy()
- * @see IWorkspaceDescription#setApplyFileStatePolicy(boolean)
- * @since 3.6
- */
- public static final String PREF_APPLY_FILE_STATE_POLICY =
- PREF_DESCRIPTION_PREFIX + "applyfilestatepolicy"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring the maximum number of milliseconds a file state should be
- * kept in the local history
- *
- * @see IWorkspaceDescription#getFileStateLongevity()
- * @see IWorkspaceDescription#setFileStateLongevity(long)
- * @since 2.1
- */
- public static final String PREF_FILE_STATE_LONGEVITY =
- PREF_DESCRIPTION_PREFIX + "filestatelongevity"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring the maximum number of states per file that can be stored
- * in the local history.
- *
- * @see IWorkspaceDescription#getMaxFileStates()
- * @see IWorkspaceDescription#setMaxFileStates(int)
- * @since 2.1
- */
- public static final String PREF_MAX_FILE_STATES =
- PREF_DESCRIPTION_PREFIX + "maxfilestates"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring the maximum permitted size of a file to be stored in the
- * local history
- *
- * @see IWorkspaceDescription#getMaxFileStateSize()
- * @see IWorkspaceDescription#setMaxFileStateSize(long)
- * @since 2.1
- */
- public static final String PREF_MAX_FILE_STATE_SIZE =
- PREF_DESCRIPTION_PREFIX + "maxfilestatesize"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring the amount of time in milliseconds between automatic
- * workspace snapshots
- *
- * @see IWorkspaceDescription#getSnapshotInterval()
- * @see IWorkspaceDescription#setSnapshotInterval(long)
- * @since 2.1
- */
- public static final String PREF_SNAPSHOT_INTERVAL =
- PREF_DESCRIPTION_PREFIX + "snapshotinterval"; // $NON-NLS-1$
-
- /**
- * Name of a preference for turning off support for linked resources. When this preference is set
- * to "true", attempting to create linked resources will fail.
- *
- * @since 2.1
- */
- public static final String PREF_DISABLE_LINKING =
- PREF_DESCRIPTION_PREFIX + "disableLinking"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring the order projects in the workspace are built.
- *
- * @see IWorkspaceDescription#getBuildOrder()
- * @see IWorkspaceDescription#setBuildOrder(String[])
- * @since 2.1
- */
- public static final String PREF_BUILD_ORDER =
- PREF_DESCRIPTION_PREFIX + "buildorder"; // $NON-NLS-1$
- /**
- * Name of a preference for configuring whether to use the workspace's default order for building
- * projects.
- *
- * @since 2.1
- */
- public static final String PREF_DEFAULT_BUILD_ORDER =
- PREF_DESCRIPTION_PREFIX + "defaultbuildorder"; // $NON-NLS-1$
-
- /**
- * The workspace managed by the single instance of this plug-in runtime class, or null
- *
is there is none.
- */
- private static Workspace workspace = null;
-
- private static String indexPath;
- private static String workspacePath;
- private static String pluginId;
-
- @Inject
- public ResourcesPlugin(
- @Named("che.jdt.workspace.index.dir") String indexPath,
- RootDirPathProvider pathProvider,
- ProviderPREF_ENCODING
preference, or the file system encoding (
- * System.getProperty("file.encoding")
) if the preference is not set.
- *
- * UnsupportedEncodingException
where this encoding is
- * used.
- *
- * @return the encoding to use when reading text files in the workspace
- * @see java.io.UnsupportedEncodingException
- */
- public static String getEncoding() {
- String enc = null; // getPlugin().getPluginPreferences().getString(PREF_ENCODING);
- // if (enc == null || enc.length() == 0) {
- enc = System.getProperty("file.encoding"); // $NON-NLS-1$
- // }
- return enc;
- }
-
- @PostConstruct
- public void start() {}
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ChangeDescription.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ChangeDescription.java
deleted file mode 100644
index 8e0fb61464d..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ChangeDescription.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2006,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * plugin.xml
) file.
- *
- *
- * ModelProvider
) generally runs plug-in-defined code.
- *
- * @see org.eclipse.core.resources.mapping.ModelProvider
- * @since 3.2
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IModelProviderDescriptor {
-
- /**
- * Return the ids of model providers that this model provider extends.
- *
- * @return the ids of model providers that this model provider extends
- */
- public String[] getExtendedModels();
-
- /**
- * Returns the unique identifier of this model provider.
- *
- * "com.xyz"
defines a provider
- * extension with id "myModelProvider"
, the unique model provider identifier will be
- * "com.xyz.myModelProvider"
.
- *
- * @return the unique model provider identifier
- */
- public String getId();
-
- /**
- * Returns a displayable label for this model provider. Returns the empty string if no label for
- * this provider is specified in the plug-in manifest file.
- *
- * ResourceMapping
objects that are part of the same model.
- *
- * null
if the
- * provider has not been registered.
- *
- * @param id a model provider id.
- * @return the descriptor for the model provider of the given id or null
if the
- * provider has not been registered
- */
- public static IModelProviderDescriptor getModelProviderDescriptor(String id) {
- IModelProviderDescriptor[] descs = ModelProviderManager.getDefault().getDescriptors();
- for (int i = 0; i < descs.length; i++) {
- IModelProviderDescriptor descriptor = descs[i];
- if (descriptor.getId().equals(id)) {
- return descriptor;
- }
- }
- return null;
- }
-
- /**
- * Return the descriptors for all model providers that are registered.
- *
- * @return the descriptors for all model providers that are registered.
- */
- public static IModelProviderDescriptor[] getModelProviderDescriptors() {
- return ModelProviderManager.getDefault().getDescriptors();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof org.eclipse.core.resources.mapping.ModelProvider) {
- org.eclipse.core.resources.mapping.ModelProvider other =
- (org.eclipse.core.resources.mapping.ModelProvider) obj;
- return other.getDescriptor().getId().equals(getDescriptor().getId());
- }
- return super.equals(obj);
- }
-
- /**
- * Return the descriptor of this model provider. The descriptor is set during initialization so
- * implements cannot call this method until after the initialize
method is invoked.
- *
- * @return the descriptor of this model provider
- */
- public final IModelProviderDescriptor getDescriptor() {
- return descriptor;
- }
-
- /**
- * Returns the unique identifier of this model provider.
- *
- * "com.xyz"
defines a provider
- * extension with id "myModelProvider"
, the unique model provider identifier will be
- * "com.xyz.myModelProvider"
.
- *
- * @return the unique model provider identifier
- */
- public final String getId() {
- return descriptor.getId();
- }
-
- /**
- * Return the resource mappings that cover the given resource. By default, an empty array is
- * returned. Subclass may override this method but should consider overriding either {@link
- * #getMappings( IResource[], org.eclipse.core.resources.mapping.ResourceMappingContext ,
- * IProgressMonitor)} or {@link #getMappings( ResourceTraversal[],
- * org.eclipse.core.resources.mapping.ResourceMappingContext , IProgressMonitor)} if more context
- * is needed to determine the proper mappings.
- *
- * @param resource the resource
- * @param context a resource mapping context
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return the resource mappings that cover the given resource.
- * @exception CoreException
- */
- public ResourceMapping[] getMappings(
- IResource resource,
- org.eclipse.core.resources.mapping.ResourceMappingContext context,
- IProgressMonitor monitor)
- throws CoreException {
- return new ResourceMapping[0];
- }
-
- /**
- * Return the set of mappings that cover the given resources. This method is used to map
- * operations on resources to operations on resource mappings. By default, this method calls
- * getMapping(IResource)
for each resource.
- *
- * null
if progress reporting is not desired
- * @return the set of mappings that cover the given resources
- * @exception CoreException
- */
- public ResourceMapping[] getMappings(
- IResource[] resources,
- org.eclipse.core.resources.mapping.ResourceMappingContext context,
- IProgressMonitor monitor)
- throws CoreException {
- Setnull
if progress reporting is not desired
- * @return the set of mappings that overlap with the given resource traversals
- */
- public ResourceMapping[] getMappings(
- ResourceTraversal[] traversals,
- org.eclipse.core.resources.mapping.ResourceMappingContext context,
- IProgressMonitor monitor)
- throws CoreException {
- Setnull
if progress reporting is not desired
- * @return a set of traversals that cover the given mappings
- * @exception CoreException
- */
- public ResourceTraversal[] getTraversals(
- ResourceMapping[] mappings, ResourceMappingContext context, IProgressMonitor monitor)
- throws CoreException {
- try {
- monitor.beginTask("", 100 * mappings.length); // $NON-NLS-1$
- Listinitialize
method once the descriptor is set so subclasses can
- * override that method if they need to do additional initialization.
- *
- * @param desc the description of the provider as it appears in the plugin manifest
- * @noreference This method is not intended to be referenced by clients.
- */
- public final void init(IModelProviderDescriptor desc) {
- if (descriptor != null)
- // prevent subsequent calls from damaging this instance
- return;
- descriptor = desc;
- initialize();
- }
-
- /**
- * Initialization method that is called after the descriptor of this provider is set. Subclasses
- * may override.
- */
- protected void initialize() {
- // Do nothing
- }
-
- /**
- * Validate the proposed changes contained in the given delta.
- *
- * OK
will be
- * shown to the user. The message should be a human readable message that will allow the user to
- * make a decision on whether to continue with the operation. The model provider id should
- * indicate which model is flagging the possible side effects.
- *
- * OK
- *
. Subclasses should override to perform validation specific to their model.
- *
- * @param delta a delta tree containing the proposed changes
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return a status indicating any potential side effects on the model that provided this
- * validator.
- */
- public IStatus validateChange(IResourceDelta delta, IProgressMonitor monitor) {
- return new ModelStatus(
- IStatus.OK,
- ResourcesPlugin.PI_RESOURCES,
- descriptor.getId(),
- Status.OK_STATUS.getMessage());
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ModelStatus.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ModelStatus.java
deleted file mode 100644
index aea5a198ffc..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ModelStatus.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2006
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * OK
- * should be shown to the user. The message should be a human readable message that will allow the
- * user to make a decision as to whether to continue with the operation. The model provider id
- * should indicate which model is flagging the the possible side effects.
- *
- * null
is returned.
- * The provided local file handle need not exist locally. A exception is thrown if the
- * corresponding base resource is not a file.
- *
- * null
if progress reporting is not desired
- * @return a storage that provides access to the contents of the local resource's corresponding
- * remote resource. If the remote file does not exist, null
is returned
- * @exception CoreException if the contents could not be fetched. Reasons include:
- *
- *
- */
- public abstract IStorage fetchBaseContents(IFile file, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns the members of the base resource corresponding to the given container. The container
- * and the returned members need not exist locally and may not include all children that exist
- * locally. An empty list is returned if the base resource is empty or does not exist. An
- * exception is thrown if the base resource is not capable of having members. This method returns
- * null
if the base members cannot be computed, in which case clients should call
- * {@link #fetchMembers( IContainer , IProgressMonitor)} which returns the combined members for
- * the base and remote.
- *
- * null
, but subclasses may override.
- *
- * @param container the local container
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return the members of the base resource corresponding to the given container
- * @exception CoreException if the members could not be fetched. Reasons include:
- *
- *
- *
- * @since 3.3
- */
- public IResource[] fetchBaseMembers(IContainer container, IProgressMonitor monitor)
- throws CoreException {
- // default implementation does nothing
- // thwart compiler warning
- return null;
- }
-
- /**
- * Returns the combined members of the base and remote resources corresponding to the given
- * container. The container need not exist locally and the result may include entries that do not
- * exist locally and may not include all local children. An empty list is returned if the remote
- * resource which corresponds to the container is empty or if the remote does not exist. An
- * exception is thrown if the corresponding remote is not capable of having members.
- *
- * null
if progress reporting is not desired
- * @return returns the combined members of the base and remote resources corresponding to the
- * given container.
- * @exception CoreException if the members could not be fetched. Reasons include:
- *
- *
- */
- public abstract IResource[] fetchMembers(IContainer container, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns an instance of IStorage in order to allow the caller to access the contents of the
- * remote that corresponds to the given local resource. If the remote file does not exist,
- * null
is returned. The provided local file handle need not exist locally. A exception is
- * thrown if the corresponding remote resource is not a file.
- *
- * null
if progress reporting is not desired
- * @return a storage that provides access to the contents of the local resource's corresponding
- * remote resource. If the remote file does not exist, null
is returned
- * @exception CoreException if the contents could not be fetched. Reasons include:
- *
- *
- */
- public abstract IStorage fetchRemoteContents(IFile file, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Returns the members of the remote resource corresponding to the given container. The container
- * and the returned members need not exist locally and may not include all children that exist
- * locally. An empty list is returned if the remote resource is empty or does not exist. An
- * exception is thrown if the remote resource is not capable of having members. This method
- * returns null
if the remote members cannot be computed, in which case clients
- * should call {@link #fetchMembers( IContainer , IProgressMonitor)} which returns the combined
- * members for the base and remote.
- *
- * null
, but subclasses may override.
- *
- * @param container the local container
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return the members of the remote resource corresponding to the given container
- * @exception CoreException if the members could not be fetched. Reasons include:
- *
- *
- *
- * @since 3.3
- */
- public IResource[] fetchRemoteMembers(IContainer container, IProgressMonitor monitor)
- throws CoreException {
- // default implementation does nothing
- // thwart compiler warning
- return null;
- }
-
- /**
- * Return the list of projects that apply to this context. In other words, the context is only
- * capable of querying the remote state for projects that are contained in the returned list.
- *
- * @return the list of projects that apply to this context
- */
- public abstract IProject[] getProjects();
-
- /**
- * For three-way comparisons, this method indicates whether local modifications have been made to
- * the given resource. For two-way comparisons, calling this method has the same effect as calling
- * {@link #hasRemoteChange(IResource, IProgressMonitor)}.
- *
- * @param resource the resource being tested
- * @param monitor a progress monitor
- * @return whether the resource contains local modifications
- * @exception CoreException if the contents could not be compared. Reasons include:
- *
- *
- */
- public abstract boolean hasLocalChange(IResource resource, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * For two-way comparisons, return whether the contents of the corresponding remote differs from
- * the content of the local file in the context of the current operation. By this we mean that
- * this method will return true
if the remote contents differ from the local
- * contents.
- *
- * true
if the
- * corresponding remote has changed since the last time the local resource was updated with the
- * remote contents.
- *
- * true
if the remote contents differ from the
- * local contents. In this case, this method is equivalent to {@link #hasLocalChange(IResource,
- * IProgressMonitor)}
- *
- * true
is
- * returned). Also, implementors will most likely use a timestamp based comparison to determine if
- * the contents differ. This may lead to a situation where true
is returned but the
- * actual contents do not differ. Clients must be prepared handle this situation.
- *
- * @param resource the local resource
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return whether the contents of the corresponding remote differ from the base.
- * @exception CoreException if the contents could not be compared. Reasons include:
- *
- *
- */
- public abstract boolean hasRemoteChange(IResource resource, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * Return true
if the context is associated with an operation that is using a
- * three-way comparison and false
if it is using a two-way comparison.
- *
- * @return whether the context is a three-way or two-way
- */
- public abstract boolean isThreeWay();
-
- /**
- * Refresh the known remote state for any resources covered by the given traversals. Clients who
- * require the latest remote state should invoke this method before invoking any others of the
- * class. Mappings can use this method as a hint to the context provider of which resources will
- * be required for the mapping to generate the proper set of traversals.
- *
- * null
if progress reporting is not desired
- * @exception CoreException if the refresh fails. Reasons include:
- *
- *
- */
- public abstract void refresh(ResourceTraversal[] traversals, int flags, IProgressMonitor monitor)
- throws CoreException;
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceChangeValidator.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceChangeValidator.java
deleted file mode 100644
index 6633ff60512..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceChangeValidator.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2006,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * IFile file = ..;//some file that is going to be changed
- * ResourceChangeValidator validator = ResourceChangeValidator.getValidator();
- * IResourceChangeDescriptionFactory factory = validator.createDeltaFactory();
- * factory.change(file);
- * IResourceDelta delta = factory.getDelta();
- * IStatus result = validator.validateChange(delta, null);
- *
If the result status does not have severity {@link IStatus#OK}, then the changes may
- * cause problems for models that are built on those resources. In this case the user should be
- * presented with the status message to determine if they want to proceed with the modification.
- *
- * @since 3.2
- */
-public final class ResourceChangeValidator {
-
- private static org.eclipse.core.resources.mapping.ResourceChangeValidator instance;
-
- /**
- * Return the singleton change validator.
- *
- * @return the singleton change validator
- */
- public static org.eclipse.core.resources.mapping.ResourceChangeValidator getValidator() {
- if (instance == null)
- instance = new org.eclipse.core.resources.mapping.ResourceChangeValidator();
- return instance;
- }
-
- /**
- * Singleton accessor method should be used instead.
- *
- * @see #getValidator()
- */
- private ResourceChangeValidator() {
- super();
- }
-
- private IStatus combineResults(IStatus[] result) {
- ListOK
should be shown to the user. The
- * message should be a human readable message that will allow the user to make a decision on
- * whether to continue with the operation. The model provider id should indicate which model is
- * flagging the the possible side effects.
- *
- * @param delta a delta tree containing the proposed changes
- * @return a status indicating any potential side effects on models stored in the affected
- * resources.
- */
- public IStatus validateChange(IResourceDelta delta, IProgressMonitor monitor) {
- monitor = Policy.monitorFor(monitor);
- try {
- // IResource[] resources = getRootResources(delta);
- // ModelProvider[] providers = getProviders(resources);
- // if (providers.length == 0)
- return Status.OK_STATUS;
- // monitor.beginTask(Messages.mapping_validate, providers.length);
- // IStatus[] result = new IStatus[providers.length];
- // for (int i = 0; i < providers.length; i++)
- // result[i] = providers[i].validateChange(delta, Policy.subMonitorFor(monitor, 1));
- // return combineResults(result);
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceMapping.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceMapping.java
deleted file mode 100644
index 3ef46f884a3..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceMapping.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
if progress reporting is not desired
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public void accept(
- ResourceMappingContext context, IResourceVisitor visitor, IProgressMonitor monitor)
- throws CoreException {
- ResourceTraversal[] traversals = getTraversals(context, monitor);
- for (int i = 0; i < traversals.length; i++) traversals[i].accept(visitor);
- }
-
- /**
- * Return whether this resource mapping contains all the resources of the given mapping.
- *
- * false
when the given resource mapping's model
- * provider id does not match that the of the receiver.
- *
- * @param mapping the given resource mapping
- * @return true
if this mapping contains all the resources of the given mapping, and
- * false
otherwise.
- */
- public boolean contains(ResourceMapping mapping) {
- return false;
- }
-
- /**
- * Override equals to compare the model objects of the mapping in order to determine equality.
- *
- * @param obj the object to compare
- * @return true
if the receiver is equal to the given object, and false
- * otherwise.
- */
- @Override
- public boolean equals(Object obj) {
- if (obj == this) return true;
- if (obj instanceof ResourceMapping) {
- ResourceMapping other = (ResourceMapping) obj;
- return other.getModelObject().equals(getModelObject());
- }
- return false;
- }
-
- /**
- * Returns all markers of the specified type on the resources in this mapping. If
- * includeSubtypes
is false
, only markers whose type exactly matches the given
- * type are returned. Returns an empty array if there are no matching markers.
- *
- * @param type the type of marker to consider, or null
to indicate all types
- * @param includeSubtypes whether or not to consider sub-types of the given type
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return an array of markers
- * @exception CoreException if this method fails.
- */
- public IMarker[] findMarkers(String type, boolean includeSubtypes, IProgressMonitor monitor)
- throws CoreException {
- final ResourceTraversal[] traversals =
- getTraversals(ResourceMappingContext.LOCAL_CONTEXT, monitor);
- ArrayListgetModelProviderId()
.
- *
- * @return the model provider
- */
- public final ModelProvider getModelProvider() {
- // try {
- // return ModelProviderManager.getDefault().getModelProvider(getModelProviderId());
- // } catch (CoreException e) {
- // throw new IllegalStateException(e.getMessage());
- // }
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns the id of the model provider that generated this resource mapping.
- *
- * @return the model provider id
- */
- public abstract String getModelProviderId();
-
- /**
- * Returns the projects that contain the resources that constitute this application model.
- *
- * @return the projects
- */
- public abstract IProject[] getProjects();
-
- /**
- * Returns one or more traversals that can be used to access all the physical resources that
- * constitute the logical resource. A traversal is simply a set of resources and the depth to
- * which they are to be traversed. This method returns an array of traversals in order to provide
- * flexibility in describing the traversals that constitute a model element.
- *
- * null
- *
, in which case the implementor can assume that only the local resources are of
- * interest to the client.
- * @param monitor a progress monitor, or null
if progress reporting is not desired
- * @return a set of traversals that cover the resources that constitute the model element
- * @exception CoreException if the traversals could not be obtained.
- */
- public abstract ResourceTraversal[] getTraversals(
- ResourceMappingContext context, IProgressMonitor monitor) throws CoreException;
-
- /** Override hashCode to use the model object. */
- @Override
- public int hashCode() {
- return getModelObject().hashCode();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceMappingContext.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceMappingContext.java
deleted file mode 100644
index e37530c3926..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceMappingContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IResource#accept
method.
- */
- public ResourceTraversal(IResource[] resources, int depth, int flags) {
- if (resources == null) throw new NullPointerException();
- this.resources = resources;
- this.depth = depth;
- this.flags = flags;
- }
-
- /**
- * Visits all existing resources defined by this traversal.
- *
- * @param visitor a resource visitor
- * @exception CoreException if this method fails. Reasons include:
- *
- *
- */
- public void accept(IResourceVisitor visitor) throws CoreException {
- for (int i = 0, imax = resources.length; i < imax; i++)
- try {
- if (resources[i].exists()) resources[i].accept(visitor, depth, flags);
- } catch (CoreException e) {
- // ignore failure in the case of concurrent deletion
- if (e.getStatus().getCode() != IResourceStatus.RESOURCE_NOT_FOUND) throw e;
- }
- }
-
- /**
- * Return whether the given resource is contained in or covered by this traversal, regardless of
- * whether the resource currently exists.
- *
- * @param resource the resource to be tested
- * @return true
if the resource is in this traversal, and false
- * otherwise.
- */
- public boolean contains(IResource resource) {
- for (int i = 0; i < resources.length; i++) {
- IResource member = resources[i];
- if (contains(member, resource)) {
- return true;
- }
- }
- return false;
- }
-
- private boolean contains(IResource resource, IResource child) {
- if (resource.equals(child)) return true;
- if (depth == IResource.DEPTH_ZERO) return false;
- if (child.getParent().equals(resource)) return true;
- if (depth == IResource.DEPTH_INFINITE)
- return resource.getFullPath().isPrefixOf(child.getFullPath());
- return false;
- }
-
- /**
- * Efficient implementation of {@link #findMarkers(String, boolean)}, not available to clients
- * because underlying non-API methods are used that may change.
- */
- void doFindMarkers(ArrayList
- * includeSubtypes
is false
, only markers whose type exactly matches the given
- * type are returned. Returns an empty array if there are no matching markers.
- *
- * @param type the type of marker to consider, or null
to indicate all types
- * @param includeSubtypes whether or not to consider sub-types of the given type
- * @return an array of markers
- * @exception CoreException if this method fails.
- * @see IResource#findMarkers(String, boolean, int)
- */
- public IMarker[] findMarkers(String type, boolean includeSubtypes) throws CoreException {
- if (resources.length == 0) return new IMarker[0];
- ArrayListIResource#accept(IResourceVisitor, int, int)
method. Clients
- * who traverse the resources manually (i.e. without calling accept
) should respect
- * the flags when determining which resources are included in the traversal.
- *
- * @return the flags for this traversal
- */
- public int getFlags() {
- return flags;
- }
-
- /**
- * Returns the file system resource(s) for this traversal. The returned resources must be
- * contained within the same project and need not exist in the local file system. The traversal of
- * the returned resources should be done considering the flag returned by getDepth. If a resource
- * returned by a traversal is a file, it should always be visited. If a resource of a traversal is
- * a folder then files contained in the folder can only be visited if the folder is
- * IResource.DEPTH_ONE or IResource.DEPTH_INFINITE. Child folders should only be visited if the
- * depth is IResource.DEPTH_INFINITE.
- *
- * @return The resources in this traversal
- */
- public IResource[] getResources() {
- return resources;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/FileModificationValidationContext.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/FileModificationValidationContext.java
deleted file mode 100644
index c5045b28616..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/FileModificationValidationContext.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2007
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * org.eclipse.swt.widgets.Shell
that is to be used to parent any dialogs
- * with the user, or null
if there is no UI context available (declared as an
- * Object
to avoid any direct references on the SWT component). If there is no shell, the
- * {@link FileModificationValidator} may still perform UI-based validation if they can obtain a
- * Shell from another source.
- *
- * @return the org.eclipse.swt.widgets.Shell
that is to be used to parent any dialogs
- * with the user, or null
- */
- public Object getShell() {
- return shell;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/FileModificationValidator.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/FileModificationValidator.java
deleted file mode 100644
index 9d20cf842d5..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/FileModificationValidator.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2007,
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
, the validator must attempt to perform the validation in a headless manner.
- * The returned status is IStatus.OK
if this validator believes the given file can be
- * modified. Other return statuses indicate the reason why the individual files cannot be
- * modified.
- *
- * @param files the files that are to be modified; these files must all exist in the workspace
- * @param context the org.eclipse.swt.widgets.Shell
that is to be used to parent any
- * dialogs with the user, or null
if there is no UI context (declared as an
- * Object
to avoid any direct references on the SWT component)
- * @return a status object that is OK if things are fine, otherwise a status describing reasons
- * why modifying the given files is not reasonable
- * @see IWorkspace#validateEdit(IFile[], Object)
- * @deprecated this method is part of the deprecated {@link IFileModificationValidator} interface.
- * Clients should call {@link #validateEdit(IFile[], FileModificationValidationContext)}
- * instead.
- */
- @Deprecated
- public final IStatus validateEdit(IFile[] files, Object context) {
- FileModificationValidationContext validationContext;
- if (context == null) validationContext = null;
- else if (context instanceof FileModificationValidationContext)
- validationContext = (FileModificationValidationContext) context;
- else validationContext = new FileModificationValidationContext(context);
- return validateEdit(files, validationContext);
- }
-
- /**
- * Validates that the given file can be saved. This method is called from IFile#setContents
- *
and IFile#appendContents
before any attempt to write data to disk. The
- * returned status is IStatus.OK
if this validator believes the given file can be
- * successfully saved. In all other cases the return value is a non-OK status. Note that a return
- * value of IStatus.OK
does not guarantee that the save will succeed.
- *
- * @param file the file that is to be modified; this file must exist in the workspace
- * @return a status indicating whether or not it is reasonable to try writing to the given file;
- * IStatus.OK
indicates a save should be attempted.
- * @see IFile#setContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor)
- * @see IFile#appendContents(java.io.InputStream, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validateSave(IFile file) {
- return validateEdit(new IFile[] {file}, (FileModificationValidationContext) null);
- }
-
- /**
- * Validates that the given files can be modified. The files must all exist in the workspace. The
- * optional context may be supplied if UI-based validation is required. If the context is
- * null
, the validator must attempt to perform the validation in a headless manner. The
- * returned status is IStatus.OK
if this validator believes the given file can be
- * modified. Other return statuses indicate the reason why the individual files cannot be
- * modified.
- *
- * @param files the files that are to be modified; these files must all exist in the workspace
- * @param context the context to aid in UI-based validation or null
if the validation
- * must be headless
- * @return a status object that is OK if things are fine, otherwise a status describing reasons
- * why modifying the given files is not reasonable
- * @see IWorkspace#validateEdit(IFile[], Object)
- */
- public abstract IStatus validateEdit(IFile[] files, FileModificationValidationContext context);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/ResourceRuleFactory.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/ResourceRuleFactory.java
deleted file mode 100644
index 6ac7ae1eb2d..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/team/ResourceRuleFactory.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2004,
- * 2011 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IResourceRuleFactory#buildRule
. This default
- * implementation always returns the workspace root.
- *
- * IResourceRuleFactory#charsetRule
. This default
- * implementation always returns the project of the resource whose charset setting is being
- * changed, or null
if the resource is the workspace root.
- *
- * IResourceRuleFactory#derivedRule
. This default
- * implementation always returns null
.
- *
- * IResourceRuleFactory#copyRule
. This default
- * implementation always returns the parent of the destination resource.
- *
- * IResourceRuleFactory#createRule
. This default
- * implementation always returns the parent of the resource being created.
- *
- * IResourceRuleFactory#deleteRule
. This default
- * implementation always returns the parent of the resource being deleted.
- *
- * IResourceRuleFactory#markerRule
. This default
- * implementation always returns null
.
- *
- * IResourceRuleFactory#modifyRule
. This default
- * implementation returns the resource being modified, or the parent resource if modifying a
- * project description file. Note that this must encompass any rule required by the
- * validateSave
hook.
- *
- * IResourceRuleFactory#moveRule
. This default
- * implementation returns a rule that combines the parent of the source resource and the parent of
- * the destination resource.
- *
- * IResourceRuleFactory#refreshRule
. This default
- * implementation always returns the parent of the resource being refreshed.
- *
- * IResourceRuleFactory#validateEditRule
. This default
- * implementation returns a rule that combines the parents of all read-only resources, or
- * null
if there are no read-only resources.
- *
- *
- * org.eclipse.core.resources.teamHook
standard extension point. Individual team providers
- * may also subclass this class. It is not intended to be subclassed by other clients. The methods
- * defined on this class are called from within the implementations of workspace API methods and
- * must not be invoked directly by clients.
- *
- * @since 2.1
- */
-public abstract class TeamHook extends InternalTeamHook {
- /**
- * The default resource scheduling rule factory. This factory can be used for projects that the
- * team hook methods do not participate in.
- *
- * @see #getRuleFactory(IProject)
- * @see #setRuleFactory(IProject, IResourceRuleFactory)
- * @since 3.0
- */
- protected final IResourceRuleFactory defaultFactory = new ResourceRuleFactory();
-
- /**
- * Creates a new team hook. Default constructor for use by subclasses and the resources plug-in
- * only.
- */
- protected TeamHook() {
- super();
- }
-
- /**
- * Returns the resource scheduling rule factory that should be used when workspace operations are
- * invoked on resources in that project. The workspace will ask the team hook this question only
- * once per project, per session. The workspace will assume the returned result is valid for the
- * rest of that session, unless the rule is changed by calling setRuleFactory
.
- *
- * null
. If no special rules are required by the team
- * hook for the given project, the value of the defaultFactory
field should be
- * returned.
- *
- * defaultFactory
- * field. Subclasses may override and provide a subclass of ResourceRuleFactory
.
- *
- * @param project the project to return scheduling rules for
- * @return the resource scheduling rules for a project
- * @see #setRuleFactory(IProject, IResourceRuleFactory)
- * @see ResourceRuleFactory
- * @since 3.0
- */
- public IResourceRuleFactory getRuleFactory(IProject project) {
- return defaultFactory;
- }
-
- /**
- * Sets the resource scheduling rule factory to use for resource modifications in the given
- * project. This method only needs to be called if the factory has changed since the initial call
- * to getRuleFactory
for the given project
- *
- * null
. If no special rules are required by the
- * team hook for the given project, the value of the defaultFactory
field should be
- * used.
- *
- * IFile.createLink
- *
.
- *
- * IStatus.OK
if linking is allowed, otherwise a
- * status object with severity IStatus.ERROR
indicating why the creation is not
- * allowed.
- * @see org.eclipse.core.resources.IResource#ALLOW_MISSING_LOCAL
- */
- public IStatus validateCreateLink(IFile file, int updateFlags, IPath location) {
- return Status.OK_STATUS;
- }
-
- /**
- * Validates whether a particular attempt at link creation is allowed. This gives team providers
- * an opportunity to hook into the beginning of the implementation of {@link IFile#createLink(URI,
- * int, IProgressMonitor) }
- *
- * IStatus.OK
if linking is allowed, otherwise a
- * status object with severity IStatus.ERROR
indicating why the creation is not
- * allowed.
- * @see org.eclipse.core.resources.IResource#ALLOW_MISSING_LOCAL
- * @since 3.2
- */
- public IStatus validateCreateLink(IFile file, int updateFlags, URI location) {
- // forward to old method to ensure old hooks get a chance to validate in the local case
- if (EFS.SCHEME_FILE.equals(location.getScheme()))
- return validateCreateLink(file, updateFlags, URIUtil.toPath(location));
- return Status.OK_STATUS;
- }
-
- /**
- * Validates whether a particular attempt at link creation is allowed. This gives team providers
- * an opportunity to hook into the beginning of the implementation of IFolder.createLink
- *
.
- *
- * IStatus.OK
if linking is allowed, otherwise a
- * status object with severity IStatus.ERROR
indicating why the creation is not
- * allowed.
- * @see org.eclipse.core.resources.IResource#ALLOW_MISSING_LOCAL
- */
- public IStatus validateCreateLink(IFolder folder, int updateFlags, IPath location) {
- return Status.OK_STATUS;
- }
-
- /**
- * Validates whether a particular attempt at link creation is allowed. This gives team providers
- * an opportunity to hook into the beginning of the implementation of {@link
- * IFolder#createLink(URI, int, IProgressMonitor)}
- *
- * IStatus.OK
if linking is allowed, otherwise a
- * status object with severity IStatus.ERROR
indicating why the creation is not
- * allowed.
- * @see org.eclipse.core.resources.IResource#ALLOW_MISSING_LOCAL
- * @since 3.2
- */
- public IStatus validateCreateLink(IFolder folder, int updateFlags, URI location) {
- // forward to old method to ensure old hooks get a chance to validate in the local case
- if (EFS.SCHEME_FILE.equals(location.getScheme()))
- return validateCreateLink(folder, updateFlags, URIUtil.toPath(location));
- return Status.OK_STATUS;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/resources/org/eclipse/core/internal/utils/messages.properties b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/resources/org/eclipse/core/internal/utils/messages.properties
deleted file mode 100644
index 2e3ae9b1c5b..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/resources/org/eclipse/core/internal/utils/messages.properties
+++ /dev/null
@@ -1,322 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2011 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
-# Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
-# Francis Lynch (Wind River) - [301563] Save and load tree snapshots
-# Martin Oberhuber (Wind River) - [306575] Save snapshot location with project
-###############################################################################
-### Resources plugin messages.
-
-### dtree
-dtree_immutable = Illegal attempt to modify an immutable tree.
-dtree_malformedTree = Malformed tree.
-dtree_missingChild = Missing child node: {0}.
-dtree_notFound = Tree element ''{0}'' not found.
-dtree_notImmutable = Tree must be immutable.
-dtree_reverse = Tried to reverse a non-comparison tree.
-dtree_subclassImplement = Subclass should have implemented this.
-dtree_switchError = Switch error in DeltaTreeReader.readNode().
-
-### events
-events_builderError = Errors running builder ''{0}'' on project ''{1}''.
-events_building_0 = Building workspace
-events_building_1 = Building ''{0}''
-events_errors = Errors occurred during the build.
-events_instantiate_1 = Error instantiating builder ''{0}''.
-events_invoking_1 = Invoking builder on ''{0}''.
-events_invoking_2 = Invoking ''{0}'' on ''{1}''.
-events_skippingBuilder = Skipping builder ''{0}'' for project ''{1}''. Either the builder is missing from the install, or it belongs to a project nature that is missing or disabled.
-events_unknown = {0} encountered while running {1}.
-
-history_copyToNull = Unable to copy local history to or from a null location.
-history_copyToSelf = Unable to copy local history to and from the same location.
-history_errorContentDescription = Error retrieving content description for local history for: ''{0}''.
-history_notValid = State is not valid or might have expired.
-history_problemsCleaning = Problems cleaning up history store.
-
-links_creating = Creating link.
-links_errorLinkReconcile = Error processing changed links in project description file.
-links_invalidLocation = ''{0}'' is not a valid location for linked resources.
-links_localDoesNotExist = Cannot create linked resource. Local location ''{0}'' does not exist.
-links_locationOverlapsLink = ''{0}'' is not a valid location because the project contains a linked resource at that location.
-links_locationOverlapsProject = Cannot create a link to ''{0}'' because it overlaps the location of the project that contains the linked resource.
-links_natureVeto = Linking is not allowed because project nature ''{0}'' does not allow it.
-links_noPath = A Link location must be specified.
-links_overlappingResource = Location ''{0}'' may overlap another resource. This can cause unexpected side-effects.
-links_updatingDuplicate = Updating duplicate resource: ''{0}''.
-links_parentNotAccessible = Cannot create linked resource ''{0}''. The parent resource is not accessible.
-links_notFileFolder = Cannot create linked resource ''{0}''. Only files and folders can be linked.
-links_vetoNature = Cannot add nature because project ''{0}'' contains linked resources, and nature ''{1}'' does not allow it.
-links_workspaceVeto = Linked resources are not supported by this application.
-links_wrongLocalType = Cannot create linked resource ''{0}''. Files cannot be linked to folders.
-links_resourceIsNotALink=Resource ''{0}'' must be a linked resource to change its linked location.
-links_setLocation=Changing link location.
-
-group_invalidParent = Only virtual folders and links can be created under a virtual folder.
-
-filters_missingFilterType= Missing resource filter type: ''{0}''.
-
-### local store
-localstore_copying = Copying ''{0}''.
-localstore_copyProblem = Problems encountered while copying resources.
-localstore_couldnotDelete = Could not delete ''{0}''.
-localstore_couldNotMove = Could not move ''{0}''.
-localstore_couldNotRead = Could not read file ''{0}''.
-localstore_couldNotWrite = Could not write file ''{0}''.
-localstore_couldNotWriteReadOnly = Could not write to read-only file: ''{0}''.
-localstore_deleteProblem = Problems encountered while deleting resources.
-localstore_deleting = Deleting ''{0}''.
-localstore_failedReadDuringWrite = Could not read from source when writing file ''{0}''
-localstore_fileExists = A resource already exists on disk ''{0}''.
-localstore_fileNotFound = File not found: {0}.
-localstore_locationUndefined = The location for ''{0}'' could not be determined because it is based on an undefined path variable.
-localstore_refreshing = Refreshing ''{0}''.
-localstore_refreshingRoot = Refreshing workspace.
-localstore_resourceExists = Resource already exists on disk: ''{0}''.
-localstore_resourceDoesNotExist = Resource does not exist on disk: ''{0}''.
-localstore_resourceIsOutOfSync = Resource is out of sync with the file system: ''{0}''.
-
-### Resource mappings and models
-mapping_invalidDef = Model provider extension found with invalid definition: {0}.
-mapping_wrongType = Model provider ''{0}'' does not extend ModelProvider.
-mapping_noIdentifier = Found model provider extension with no identifier; ignoring extension.
-mapping_validate = Validating resource changes
-mapping_multiProblems = Multiple potential side effects have been identified.
-
-### internal.resources
-natures_duplicateNature = Duplicate nature: {0}.
-natures_hasCycle = Nature is invalid because its prerequisites form a cycle: {0}
-natures_missingIdentifier = Found nature extension with no identifier; ignoring extension.
-natures_missingNature = Nature does not exist: {0}.
-natures_missingPrerequisite = Nature {0} is missing prerequisite nature: {1}.
-natures_multipleSetMembers = Multiple natures found for nature set: {0}.
-natures_invalidDefinition = Nature extension found with invalid definition: {0}.
-natures_invalidRemoval = Cannot remove nature {0} because it is a prerequisite of nature {1}.
-natures_invalidSet = The set of natures is not valid.
-
-pathvar_length = Path variable name must have a length > 0.
-pathvar_beginLetter = Path variable name must begin with a letter or underscore.
-pathvar_invalidChar = Path variable name cannot contain character: {0}.
-pathvar_invalidValue = Path variable value must be valid and absolute.
-pathvar_undefined = ''{0}'' is not a valid location. The location is relative to undefined workspace path variable ''{1}''.
-pathvar_whitespace= Path variable name cannot contain whitespace
-
-### preferences
-preferences_deleteException=Exception deleting file: {0}.
-preferences_loadException=Exception loading preferences from: {0}.
-preferences_operationCanceled=Operation canceled.
-preferences_removeNodeException=Exception while removing preference node: {0}.
-preferences_clearNodeException=Exception while clearing preference node: {0}.
-preferences_saveProblems=Exception occurred while saving project preferences: {0}.
-preferences_syncException=Exception occurred while synchronizing node: {0}.
-
-projRead_badLinkName = Names ''{0}'' and ''{1}'' detected for a single link. Using ''{0}''.
-projRead_badLinkType2 = Types ''{0}'' and ''{1}'' detected for a single link. Using ''{0}''.
-projRead_badLocation = Locations ''{0}'' and ''{1}'' detected for a single link. Using ''{0}''.
-projRead_emptyLinkName = Empty name detected for linked resource with type ''{0}'' and location ''{1}''.
-projRead_badLinkType = Illegal link type \"-1\" detected for linked resource with name ''{0}'' and location ''{1}''.
-projRead_badLinkLocation = Empty location detected for linked resource with name ''{0}'' and type ''{1}''.
-projRead_whichKey = Two values detected for an argument name in a build command: ''{0}'' and ''{1}''. Using ''{0}''.
-projRead_whichValue = Two values detected for an argument value in a build command: ''{0}'' and ''{1}''. Using ''{0}''.
-projRead_notProjectDescription = Encountered element name ''{0}'' instead of \"project\" when trying to read a project description file.
-projRead_badSnapshotLocation = Invalid resource snapshot location URI ''{0}'' is not absolute.
-projRead_cannotReadSnapshot = Failed to read resource snapshot for project ''{0}'': {1}
-projRead_failureReadingProjectDesc = Failure occurred reading .project file.
-projRead_missingProjectName = Missing project name.
-
-projRead_emptyVariableName = Empty variable name detected in project "{0}\".
-
-projRead_badFilterName = Names ''{0}'' and ''{1}'' detected for a single filter. Using ''{0}''.
-projRead_emptyFilterName = Empty name detected for filtered resource with type ''{0}'' and id ''{1}''.
-projRead_badFilterID = Empty filter id detected for filtered resource with name ''{0}'' and type ''{1}''.
-projRead_badFilterType = Illegal filter type \"-1\" detected for filtered resource with name ''{0}'' and id ''{1}''.
-projRead_badFilterType2 = Types ''{0}'' and ''{1}'' detected for a single filter. Using ''{0}''.
-projRead_badID = IDs ''{0}'' and ''{1}'' detected for a single filter. Using ''{0}''.
-projRead_badArguments= Arguments ''{0}'' and ''{1}'' detected for a single filter. Using ''{0}''.
-
-properties_qualifierIsNull = Qualifier part of property key cannot be null.
-properties_readProperties = Failure while reading persistent properties for resource ''{0}'', file was corrupt. Some properties may have been lost.
-properties_valueTooLong = Could not set property: {0} {1}. Value is too long.
-properties_couldNotClose = Could not close property store for: {0}.
-
-### auto-refresh
-refresh_jobName = Refreshing workspace
-refresh_task = Resources to refresh: {0}
-refresh_pollJob = Searching for local changes
-refresh_refreshErr = Problems occurred while refreshing local changes
-refresh_installError = An error occurred while installing an auto-refresh monitor
-
-resources_cannotModify = The resource tree is locked for modifications.
-resources_changeInAdd = Trying to change a marker in an add method.
-resources_charsetBroadcasting = Reporting encoding changes.
-resources_charsetUpdating = Updating encoding settings.
-resources_closing_0 = Closing workspace.
-resources_closing_1 = Closing ''{0}''.
-resources_copyDestNotSub = Cannot copy ''{0}''. Destination should not be under source''s hierarchy.
-resources_copying = Copying ''{0}''.
-resources_copying_0 = Copying.
-resources_copyNotMet = Copy requirements not met.
-resources_copyProblem = Problems encountered while copying resources.
-resources_couldnotDelete = Could not delete ''{0}''.
-resources_create = Create.
-resources_creating = Creating resource ''{0}''.
-resources_deleteMeta = Could not delete metadata for ''{0}''.
-resources_deleteProblem = Problems encountered while deleting resources.
-resources_deleting = Deleting ''{0}''.
-resources_deleting_0 = Deleting.
-resources_destNotNull = Destination path should not be null.
-resources_errorContentDescription = Error retrieving content description for resource ''{0}''.
-resources_errorDeleting = Error deleting resource ''{0}'' from the workspace tree.
-resources_errorMarkersDelete = Error deleting markers for resource ''{0}''.
-resources_errorMarkersMove = Error moving markers from resource ''{0}'' to ''{1}''.
-resources_wrongMarkerAttributeValueType = "The attribute value type is {0} and expected is one of java.lang.String, Boolean, Integer"
-resources_errorMembers = Error retrieving members of container ''{0}''.
-resources_errorMoving = Error moving resource ''{0}'' to ''{1}'' in the workspace tree.
-resources_errorNature = Error configuring nature ''{0}''.
-resources_errorPropertiesMove = Error moving properties for resource ''{0}'' to ''{1}''.
-resources_errorRefresh = Errors occurred during refresh of resource ''{0}''.
-resources_errorReadProject = Failed to read project description file from location ''{0}''.
-resources_errorMultiRefresh = Errors occurred while refreshing resources with the local file system.
-resources_errorValidator = Exception running validator code.
-resources_errorVisiting = An error occurred while traversing resources.
-resources_existsDifferentCase = A resource exists with a different case: ''{0}''.
-resources_existsLocalDifferentCase = A resource exists on disk with a different case: ''{0}''.
-resources_exMasterTable = Could not read master table.
-resources_exReadProjectLocation = Could not read the project location for ''{0}''.
-resources_exSafeRead = Could not read safe table.
-resources_exSafeSave = Could not save safe table.
-resources_exSaveMaster = Could not save master table to file ''{0}''.
-resources_exSaveProjectLocation = Could not save the project location for ''{0}''.
-resources_fileExists = A resource already exists on disk ''{0}''.
-resources_fileToProj = Cannot copy a file to a project.
-resources_flushingContentDescriptionCache = Flushing content description cache.
-resources_folderOverFile = Cannot overwrite folder with file ''{0}''.
-resources_format = Incompatible file format. Workspace was saved with an incompatible version: {0}.
-resources_initValidator = Unable to instantiate validator.
-resources_initHook = Unable to instantiate move/delete hook.
-resources_initTeamHook = Unable to instantiate team hook.
-resources_invalidCharInName = {0} is an invalid character in resource name ''{1}''.
-resources_invalidCharInPath = {0} is an invalid character in path ''{1}''.
-resources_invalidName = ''{0}'' is an invalid name on this platform.
-resources_invalidPath = ''{0}'' is an invalid resource path.
-resources_invalidProjDesc = Invalid project description.
-resources_invalidResourceName = ''{0}'' is an invalid resource name.
-resources_invalidRoot = Root (/) is an invalid resource path.
-resources_markerNotFound = Marker id {0} not found.
-resources_missingProjectMeta = The project description file (.project) for ''{0}'' is missing. This file contains important information about the project. The project will not function properly until this file is restored.
-resources_missingProjectMetaRepaired = The project description file (.project) for ''{0}'' was missing. This file contains important information about the project. A new project description file has been created, but some information about the project may have been lost.
-resources_moveDestNotSub = Cannot move ''{0}''. Destination should not be under source''s hierarchy.
-resources_moveMeta = Error moving metadata area from {0} to {1}.
-resources_moveNotMet = Move requirements not met.
-resources_moveNotProject = Cannot move ''{0}'' to ''{1}''. Source must be a project.
-resources_moveProblem = Problems encountered while moving resources.
-resources_moveRoot = Cannot move the workspace root.
-resources_moving = Moving ''{0}''.
-resources_moving_0 = Moving.
-resources_mustBeAbsolute = Path ''{0}'' must be absolute.
-resources_mustBeLocal = Resource ''{0}'' is not local.
-resources_mustBeOpen = Resource ''{0}'' is not open.
-resources_mustExist = Resource ''{0}'' does not exist.
-resources_mustNotExist = Resource ''{0}'' already exists.
-resources_nameEmpty = Name cannot be empty.
-resources_nameNull = Name must not be null.
-resources_natureClass = Missing project nature class for ''{0}''.
-resources_natureDeconfig = Error deconfiguring nature: {0}.
-resources_natureExtension = Missing project nature extension for {0}.
-resources_natureFormat = Project nature {0} does not specify a runtime attribute.
-resources_natureImplement = Project nature {0} does not implement IProjectNature.
-resources_notChild = Resource ''{0}'' is not a child of ''{1}''.
-resources_oneValidator = There must be exactly 0 or 1 validator extensions defined in the fileModificationValidator extension point.
-resources_oneHook = There must be exactly 0 or 1 hook extensions defined in the moveDeleteHook extension point.
-resources_oneTeamHook = There must be exactly 0 or 1 hook extensions defined in the teamHook extension point.
-resources_opening_1 = Opening ''{0}''.
-resources_overlapWorkspace = {0} overlaps the workspace location: {1}
-resources_overlapProject = {0} overlaps the location of another project: ''{1}''
-resources_pathNull = Paths must not be null.
-resources_projectDesc = Problems encountered while setting project description.
-resources_projectDescSync = Could not set the project description for ''{0}'' because the project description file (.project) is out of sync with the file system.
-resources_projectMustNotBeOpen = Project must not be open.
-resources_projectPath = Path for project must have only one segment.
-resources_pruningHistory = Pruning history.
-resources_reading = Reading.
-resources_readingSnap = Reading snapshot.
-resources_readingEncoding = Could not read encoding settings.
-resources_readMarkers = Failure while reading markers, the marker file was corrupt. Some markers may be lost.
-resources_readMeta = Could not read metadata for ''{0}''.
-resources_readMetaWrongVersion = Could not read metadata for ''{0}''. Unexpected version: {1}.
-resources_readOnly = Resource ''{0}'' is read-only.
-resources_readOnly2 = Cannot edit read-only resources.
-resources_readProjectMeta = Failed to read the project description file (.project) for ''{0}''. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state.
-resources_readProjectTree = Problems reading project tree.
-resources_readSync = Errors reading sync info file: {0}.
-resources_readWorkspaceMeta = Could not read workspace metadata.
-resources_readWorkspaceMetaValue = Invalid attribute value in workspace metadata: {0}. Value will be ignored.
-resources_readWorkspaceSnap = Problems reading workspace tree snapshot.
-resources_readWorkspaceTree = Problems reading workspace tree.
-resources_refreshing = Refreshing ''{0}''.
-resources_refreshingRoot = Refreshing workspace.
-resources_resetMarkers = Could not reset markers snapshot file.
-resources_resetSync = Could not reset sync info snapshot file.
-resources_resourcePath = Invalid path for resource ''{0}''. Must include project and resource name.
-resources_saveOp = Save cannot be called from inside an operation.
-resources_saveProblem = Problems occurred during save.
-resources_saveWarnings = Save operation warnings.
-resources_saving_0 = Saving workspace.
-resources_savingEncoding = Could not save encoding settings.
-resources_setDesc = Setting project description.
-resources_setLocal = Setting resource local flag.
-resources_settingCharset = Setting character set for resource ''{0}''.
-resources_settingDefaultCharsetContainer = Setting default character set for resource ''{0}''.
-resources_settingContents = Setting contents for ''{0}''.
-resources_settingDerivedFlag = Setting derived flag for resource ''{0}''.
-resources_shutdown = Workspace was not properly initialized or has already shutdown.
-resources_shutdownProblems = Problem on shutdown.
-resources_snapInit = Could not initialize snapshot file.
-resources_snapRead = Could not read snapshot file.
-resources_snapRequest = Snapshot requested.
-resources_snapshot = Periodic workspace save.
-resources_startupProblems = Workspace restored, but some problems occurred.
-resources_touch = Touching resource ''{0}''.
-resources_updating = Updating workspace
-resources_updatingEncoding = Problems encountered while updating encoding settings.
-resources_workspaceClosed = Workspace is closed.
-resources_workspaceOpen = The workspace is already open.
-resources_writeMeta = Could not write metadata for ''{0}''.
-resources_writeWorkspaceMeta = Could not write workspace metadata ''{0}''.
-resources_errorResourceIsFiltered=The resource will be filtered out by its parent resource filters
-
-synchronizer_partnerNotRegistered = Sync partner: {0} not registered with the synchronizer.
-
-### URL
-url_badVariant = Unsupported \"platform:\" protocol variation {0}.
-url_couldNotResolve_projectDoesNotExist = Project ''{0}'' does not exist. Could not resolve URL: {1}.
-url_couldNotResolve_URLProtocolHandlerCanNotResolveURL = A protocol handler does not exist or can not resolve URL ''{0}'' into URL with file protocol. Could not resolve URL: {1}.
-url_couldNotResolve_resourceLocationCanNotBeDetermined = Resource location ''{0}'' can not be determined. Could not resolve URL: {1}.
-
-### utils
-utils_clone = Clone not supported.
-utils_stringJobName = Compacting resource model
-
-### watson
-watson_elementNotFound = Element not found: {0}.
-watson_illegalSubtree = Illegal subtree passed to createSubtree().
-watson_immutable = Attempt to modify an immutable tree.
-watson_noModify = Cannot modify implicit root node.
-watson_nullArg = Null argument to {0}.
-watson_unknown = Unknown format.
-
-### auto-refresh win32 native
-WM_beginTask = finding out of sync resources
-WM_jobName = Win32 refresh daemon
-WM_errors = Problems occurred refreshing resources
-WM_nativeErr = Problem occurred in auto-refresh native code: {0}.
-WM_errCloseHandle = Problem closing native refresh handle: {0}.
-WM_errCreateHandle = Problem creating handle for {0}, code: {0}.
-WM_errFindChange = Problem finding next change, code: {0}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml
deleted file mode 100644
index 9b7fe3e20c1..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/pom.xml
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
"); // $NON-NLS-1$
- addAnnotations(buffer, element, element.getTypeRoot(), null);
- Reader reader = null;
- try {
- String content =
- element instanceof IMember
- ? JavadocContentAccess2.getHTMLContent(element, true, baseHref)
- : null; // JavadocContentAccess2.getHTMLContent((IPackageFragment)element);
- IPackageFragmentRoot root =
- (IPackageFragmentRoot) element.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
- if (content != null) {
- reader = new StringReader(content);
- } else {
- String explanationForMissingJavadoc =
- JavaDocLocations.getExplanationForMissingJavadoc(element, root);
- if (explanationForMissingJavadoc != null)
- reader = new StringReader(explanationForMissingJavadoc);
- }
- } catch (CoreException ex) {
- reader = new StringReader(JavaDocLocations.handleFailedJavadocFetch(ex));
- }
-
- if (reader != null) {
- HTMLPrinter.addParagraph(buffer, reader);
- }
- hasContents = true;
- }
-
- if (!hasContents) return null;
-
- if (buffer.length() > 0) {
- HTMLPrinter.insertPageProlog(buffer, 0, getStyleSheet());
- HTMLPrinter.addPageEpilog(buffer);
- return buffer.toString();
- }
-
- return null;
- }
-
- public static String getStyleSheet() {
- if (styleSheet == null) {
- try (InputStream stream =
- JavadocFinder.class
- .getClassLoader()
- .getResource("JavadocHoverStyleSheet.css")
- .openStream()) {
- styleSheet = IoUtil.readStream(stream);
- } catch (IOException e) {
- LOG.error("Can't read JavadocHoverStyleSheet.css", e);
- }
- }
- return styleSheet;
- }
-
- private String getInfoText(
- IJavaElement element, ITypeRoot editorInputElement, boolean allowImage) {
- long flags = getHeaderFlags(element);
- StringBuffer label = new StringBuffer(JavaElementLinks.getElementLabel(element, flags));
-
- if (element.getElementType() == IJavaElement.FIELD) {
- String constantValue = getConstantValue((IField) element, editorInputElement);
- if (constantValue != null) {
- constantValue = HTMLPrinter.convertToHTMLContentWithWhitespace(constantValue);
- IJavaProject javaProject = element.getJavaProject();
- label.append(getFormattedAssignmentOperator(javaProject));
- label.append(constantValue);
- }
- }
-
- // if (element.getElementType() == IJavaElement.METHOD) {
- // IMethod method= (IMethod)element;
- // //TODO: add default value for annotation type members, see
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=249016
- // }
-
- return getImageAndLabel(element, allowImage, label.toString());
- }
-
- /**
- * Returns the assignment operator string with the project's formatting applied to it.
- *
- * @param javaProject the Java project whose formatting options will be used.
- * @return the formatted assignment operator string.
- * @since 3.4
- */
- public static String getFormattedAssignmentOperator(IJavaProject javaProject) {
- StringBuffer buffer = new StringBuffer();
- if (JavaCore.INSERT.equals(
- javaProject.getOption(
- DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR, true)))
- buffer.append(' ');
- buffer.append('=');
- if (JavaCore.INSERT.equals(
- javaProject.getOption(
- DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATOR, true)))
- buffer.append(' ');
- return buffer.toString();
- }
- /**
- * Returns the constant value for the given field.
- *
- * @param field the field
- * @param editorInputElement the editor input element
- * @param hoverRegion the hover region in the editor
- * @return the constant value for the given field or null
if none
- * @since 3.4
- */
- private String getConstantValue(IField field, ITypeRoot editorInputElement) {
- // if (!isStaticFinal(field))
- // return null;
- //
- // ASTNode node= getHoveredASTNode(editorInputElement, hoverRegion);
- // if (node == null)
- // return null;
- //
- // Object constantValue= getVariableBindingConstValue(node, field);
- // if (constantValue == null)
- // return null;
- //
- // if (constantValue instanceof String) {
- // return ASTNodes.getEscapedStringLiteral((String) constantValue);
- // } else {
- // return getHexConstantValue(constantValue);
- // }
- return null;
- }
-
- public void addAnnotations(
- StringBuffer buf, IJavaElement element, ITypeRoot editorInputElement, IRegion hoverRegion) {
- try {
- if (element instanceof IAnnotatable) {
- String annotationString = getAnnotations(element, editorInputElement, hoverRegion);
- if (annotationString != null) {
- buf.append("
"); // $NON-NLS-1$
- } catch (URISyntaxException e) {
- // no annotations this time...
- buf.append("
"); // $NON-NLS-1$
- }
- }
-
- private String getAnnotations(
- IJavaElement element, ITypeRoot editorInputElement, IRegion hoverRegion)
- throws URISyntaxException, JavaModelException {
- if (!(element instanceof IPackageFragment)) {
- if (!(element instanceof IAnnotatable)) return null;
-
- if (((IAnnotatable) element).getAnnotations().length == 0) return null;
- }
-
- IBinding binding = null;
- // TODO
- ASTNode node = null; // getHoveredASTNode(editorInputElement, hoverRegion);
-
- if (node == null) {
- // todo use ast ported parser,that uses our java model
- // ASTParser p = ASTParser.newParser(ASTProvider.SHARED_AST_LEVEL);
- // p.setProject(element.getJavaProject());
- // p.setBindingsRecovery(true);
- // try {
- // binding = p.createBindings(new IJavaElement[]{element}, null)[0];
- // } catch (OperationCanceledException e) {
- // return null;
- // }
-
- } else {
- binding = resolveBinding(node);
- }
-
- if (binding == null) return null;
-
- IAnnotationBinding[] annotations = binding.getAnnotations();
- if (annotations.length == 0) return null;
-
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < annotations.length; i++) {
- // TODO: skip annotations that don't have an @Documented annotation?
- addAnnotation(buf, element, annotations[i]);
- buf.append("
"); // $NON-NLS-1$
- }
-
- return buf.toString();
- }
-
- private void addAnnotation(StringBuffer buf, IJavaElement element, IAnnotationBinding annotation)
- throws URISyntaxException {
- IJavaElement javaElement = annotation.getAnnotationType().getJavaElement();
- buf.append('@');
- if (javaElement != null) {
- String uri = JavaElementLinks.createURI(baseHref, javaElement);
- addLink(buf, uri, annotation.getName());
- } else {
- buf.append(annotation.getName());
- }
-
- IMemberValuePairBinding[] mvPairs = annotation.getDeclaredMemberValuePairs();
- if (mvPairs.length > 0) {
- buf.append('(');
- for (int j = 0; j < mvPairs.length; j++) {
- if (j > 0) {
- buf.append(JavaElementLabels.COMMA_STRING);
- }
- IMemberValuePairBinding mvPair = mvPairs[j];
- String memberURI =
- JavaElementLinks.createURI(baseHref, mvPair.getMethodBinding().getJavaElement());
- addLink(buf, memberURI, mvPair.getName());
- buf.append('=');
- addValue(buf, element, mvPair.getValue());
- }
- buf.append(')');
- }
- }
-
- private void addValue(StringBuffer buf, IJavaElement element, Object value)
- throws URISyntaxException {
- // Note: To be bug-compatible with Javadoc from Java 5/6/7, we currently don't escape HTML tags
- // in String-valued annotations.
- if (value instanceof ITypeBinding) {
- ITypeBinding typeBinding = (ITypeBinding) value;
- IJavaElement type = typeBinding.getJavaElement();
- if (type == null) {
- buf.append(typeBinding.getName());
- } else {
- String uri = JavaElementLinks.createURI(baseHref, type);
- String name = type.getElementName();
- addLink(buf, uri, name);
- }
- buf.append(".class"); // $NON-NLS-1$
-
- } else if (value instanceof IVariableBinding) { // only enum constants
- IVariableBinding variableBinding = (IVariableBinding) value;
- IJavaElement variable = variableBinding.getJavaElement();
- String uri = JavaElementLinks.createURI(baseHref, variable);
- String name = variable.getElementName();
- addLink(buf, uri, name);
-
- } else if (value instanceof IAnnotationBinding) {
- IAnnotationBinding annotationBinding = (IAnnotationBinding) value;
- addAnnotation(buf, element, annotationBinding);
-
- } else if (value instanceof String) {
- buf.append(ASTNodes.getEscapedStringLiteral((String) value));
-
- } else if (value instanceof Character) {
- buf.append(ASTNodes.getEscapedCharacterLiteral((Character) value));
-
- } else if (value instanceof Object[]) {
- Object[] values = (Object[]) value;
- buf.append('{');
- for (int i = 0; i < values.length; i++) {
- if (i > 0) {
- buf.append(JavaElementLabels.COMMA_STRING);
- }
- addValue(buf, element, values[i]);
- }
- buf.append('}');
-
- } else { // primitive types (except char) or null
- buf.append(String.valueOf(value));
- }
- }
-
- public String getImageAndLabel(IJavaElement element, boolean allowImage, String label) {
- StringBuffer buf = new StringBuffer();
- int imageWidth = 16;
- int imageHeight = 16;
- int labelLeft = 20;
- int labelTop = 2;
-
- buf.append("null
if the id was not valid
- */
- private static synchronized char[] scannedIdentifier(
- String id, String sourceLevel, String complianceLevel) {
- if (id == null) {
- return null;
- }
- // Set scanner for given source and compliance levels
- SCANNER.sourceLevel =
- sourceLevel == null
- ? ClassFileConstants.JDK1_3
- : CompilerOptions.versionToJdkLevel(sourceLevel);
- SCANNER.complianceLevel =
- complianceLevel == null
- ? ClassFileConstants.JDK1_3
- : CompilerOptions.versionToJdkLevel(complianceLevel);
-
- try {
- SCANNER.setSource(id.toCharArray());
- int token = SCANNER.scanIdentifier();
- if (token != TerminalTokens.TokenNameIdentifier) return null;
- if (SCANNER.currentPosition
- == SCANNER.eofPosition) { // to handle case where we had an ArrayIndexOutOfBoundsException
- try {
- return SCANNER.getCurrentIdentifierSource();
- } catch (ArrayIndexOutOfBoundsException e) {
- return null;
- }
- } else {
- return null;
- }
- } catch (InvalidInputException e) {
- return null;
- }
- }
-
- /**
- * Validate the given compilation unit name.
- *
- *
- *
- *
- * @param name the name of a compilation unit
- * @return a status object with code IStatus.OK
if the given name is valid as a
- * compilation unit name, otherwise a status object indicating what is wrong with the name
- * @deprecated Use {@link #validateCompilationUnitName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateCompilationUnitName(String name) {
- return validateCompilationUnitName(
- name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given compilation unit name for the given source and compliance levels.
- *
- *
- *
- *
- * @param name the name of a compilation unit
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code IStatus.OK
if the given name is valid as a
- * compilation unit name, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validateCompilationUnitName(
- String name, String sourceLevel, String complianceLevel) {
- if (name == null) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_unit_nullName,
- null);
- }
- if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(name)) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_unit_notJavaName,
- null);
- }
- String identifier;
- int index;
- index = name.lastIndexOf('.');
- if (index == -1) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_unit_notJavaName,
- null);
- }
- identifier = name.substring(0, index);
- // JSR-175 metadata strongly recommends "package-info.java" as the
- // file in which to store package annotations and
- // the package-level spec (replaces package.html)
- if (!identifier.equals(PACKAGE_INFO)) {
- IStatus status = validateIdentifier(identifier, sourceLevel, complianceLevel);
- if (!status.isOK()) {
- return status;
- }
- }
- // IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
- // if (!status.isOK()) {
- // return status;
- // }
- return JavaModelStatus.VERIFIED_OK;
- }
-
- /**
- * Validate the given .class file name.
- *
- *
- *
- *
- * @param name the name of a .class file
- * @return a status object with code ".class"
suffix
- * IStatus.OK
if the given name is valid as a
- * .class file name, otherwise a status object indicating what is wrong with the name
- * @since 2.0
- * @deprecated Use {@link #validateClassFileName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateClassFileName(String name) {
- return validateClassFileName(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given .class file name for the given source and compliance levels.
- *
- *
- *
- *
- * @param name the name of a .class file
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code ".class"
suffix
- * IStatus.OK
if the given name is valid as a
- * .class file name, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validateClassFileName(
- String name, String sourceLevel, String complianceLevel) {
- if (name == null) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_classFile_nullName,
- null);
- }
- if (!org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(name)) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_classFile_notClassFileName,
- null);
- }
- String identifier;
- int index;
- index = name.lastIndexOf('.');
- if (index == -1) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_classFile_notClassFileName,
- null);
- }
- identifier = name.substring(0, index);
- // JSR-175 metadata strongly recommends "package-info.java" as the
- // file in which to store package annotations and
- // the package-level spec (replaces package.html)
- if (!identifier.equals(PACKAGE_INFO)) {
- IStatus status = validateIdentifier(identifier, sourceLevel, complianceLevel);
- if (!status.isOK()) {
- return status;
- }
- }
- // IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
- // if (!status.isOK()) {
- // return status;
- // }
- return JavaModelStatus.VERIFIED_OK;
- }
-
- /**
- * Validate the given field name.
- *
- *
- * "x"
.
- *
- * @param name the name of a field
- * @return a status object with code IStatus.OK
if the given name is valid as a field
- * name, otherwise a status object indicating what is wrong with the name
- * @deprecated Use {@link #validateFieldName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateFieldName(String name) {
- return validateIdentifier(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given field name for the given source and compliance levels.
- *
- *
- * "x"
.
- *
- * @param name the name of a field
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code IStatus.OK
if the given name is valid as a field
- * name, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validateFieldName(String name, String sourceLevel, String complianceLevel) {
- return validateIdentifier(name, sourceLevel, complianceLevel);
- }
-
- /**
- * Validate the given Java identifier. The identifier must not have the same spelling as a Java
- * keyword, boolean literal ("true"
, "false"
), or null literal (
- * "null"
). See section 3.8 of the Java Language Specification, Second Edition
- * (JLS2). A valid identifier can act as a simple type name, method name or field name.
- *
- * @param id the Java identifier
- * @return a status object with code IStatus.OK
if the given identifier is a valid
- * Java identifier, otherwise a status object indicating what is wrong with the identifier
- * @deprecated Use {@link #validateIdentifier(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateIdentifier(String id) {
- return validateIdentifier(id, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given Java identifier for the given source and compliance levels The identifier
- * must not have the same spelling as a Java keyword, boolean literal ("true"
,
- * "false"
), or null literal ("null"
). See section 3.8 of the Java
- * Language Specification, Second Edition (JLS2). A valid identifier can act as a simple type
- * name, method name or field name.
- *
- * @param id the Java identifier
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code IStatus.OK
if the given identifier is a valid
- * Java identifier, otherwise a status object indicating what is wrong with the identifier
- * @since 3.3
- */
- public static IStatus validateIdentifier(String id, String sourceLevel, String complianceLevel) {
- if (scannedIdentifier(id, sourceLevel, complianceLevel) != null) {
- return JavaModelStatus.VERIFIED_OK;
- } else {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.bind(Messages.convention_illegalIdentifier, id),
- null);
- }
- }
-
- /**
- * Validate the given import declaration name.
- *
- * "java.util.*"
or
- * "java.util.Hashtable"
.
- *
- * @param name the import declaration
- * @return a status object with code IStatus.OK
if the given name is valid as an
- * import declaration, otherwise a status object indicating what is wrong with the name
- * @deprecated Use {@link #validateImportDeclaration(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateImportDeclaration(String name) {
- return validateImportDeclaration(
- name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given import declaration name for the given source and compliance levels.
- *
- * "java.util.*"
or
- * "java.util.Hashtable"
.
- *
- * @param name the import declaration
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code IStatus.OK
if the given name is valid as an
- * import declaration, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validateImportDeclaration(
- String name, String sourceLevel, String complianceLevel) {
- if (name == null || name.length() == 0) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_import_nullImport,
- null);
- }
- if (name.charAt(name.length() - 1) == '*') {
- if (name.charAt(name.length() - 2) == '.') {
- return validatePackageName(
- name.substring(0, name.length() - 2), sourceLevel, complianceLevel);
- } else {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_import_unqualifiedImport,
- null);
- }
- }
- return validatePackageName(name, sourceLevel, complianceLevel);
- }
-
- /**
- * Validate the given Java type name, either simple or qualified. For example,
- * "java.lang.Object"
, or "Object"
.
- *
- * IStatus.OK
if the given name is valid as a Java
- * type name, a status with code IStatus.WARNING
indicating why the given name is
- * discouraged, otherwise a status object indicating what is wrong with the name
- * @deprecated Use {@link #validateJavaTypeName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateJavaTypeName(String name) {
- return validateJavaTypeName(
- name, org.eclipse.jdt.core.JavaCore.VERSION_1_3, org.eclipse.jdt.core.JavaCore.VERSION_1_3);
- }
-
- /**
- * Validate the given Java type name, either simple or qualified, for the given source and
- * compliance levels.
- *
- * "java.lang.Object"
, or "Object"
.
- *
- *
- * JavaCore#VERSION_1_x
, x being set between '1' and '8'.
- *
- * @param name the name of a type
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code IStatus.OK
if the given name is valid as a Java
- * type name, a status with code IStatus.WARNING
indicating why the given name is
- * discouraged, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_1
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_2
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_3
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_4
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_5
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_6
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_7
- * @see org.eclipse.jdt.core.JavaCore#VERSION_1_8
- */
- public static IStatus validateJavaTypeName(
- String name, String sourceLevel, String complianceLevel) {
- if (name == null) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_type_nullName,
- null);
- }
- String trimmed = name.trim();
- if (!name.equals(trimmed)) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_type_nameWithBlanks,
- null);
- }
- int index = name.lastIndexOf('.');
- char[] scannedID;
- if (index == -1) {
- // simple name
- scannedID = scannedIdentifier(name, sourceLevel, complianceLevel);
- } else {
- // qualified name
- String pkg = name.substring(0, index).trim();
- IStatus status = validatePackageName(pkg, sourceLevel, complianceLevel);
- if (!status.isOK()) {
- return status;
- }
- String type = name.substring(index + 1).trim();
- scannedID = scannedIdentifier(type, sourceLevel, complianceLevel);
- }
-
- if (scannedID != null) {
- // IStatus status = ResourcesPlugin.getWorkspace().validateName(new String(scannedID),
- // IResource.FILE);
- // if (!status.isOK()) {
- // return status;
- // }
- if (CharOperation.contains('$', scannedID)) {
- return new Status(
- IStatus.WARNING,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_type_dollarName,
- null);
- }
- if ((scannedID.length > 0 && ScannerHelper.isLowerCase(scannedID[0]))) {
- return new Status(
- IStatus.WARNING,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_type_lowercaseName,
- null);
- }
- return JavaModelStatus.VERIFIED_OK;
- } else {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.bind(Messages.convention_type_invalidName, name),
- null);
- }
- }
-
- /**
- * Validate the given method name. The special names "<init>" and "<clinit>" are not
- * valid.
- *
- * IStatus.OK
if the given name is valid as a
- * method name, otherwise a status object indicating what is wrong with the name
- * @deprecated Use {@link #validateMethodName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateMethodName(String name) {
- return validateMethodName(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given method name for the given source and compliance levels. The special names
- * "<init>" and "<clinit>" are not valid.
- *
- * IStatus.OK
if the given name is valid as a
- * method name, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validateMethodName(
- String name, String sourceLevel, String complianceLevel) {
- return validateIdentifier(name, sourceLevel, complianceLevel);
- }
-
- /**
- * Validate the given package name.
- *
- * "java.lang"
.
- *
- * IStatus.OK
if the given name is valid as a
- * package name, otherwise a status object indicating what is wrong with the name
- * @deprecated Use {@link #validatePackageName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validatePackageName(String name) {
- return validatePackageName(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given package name for the given source and compliance levels.
- *
- * "java.lang"
.
- *
- * IStatus.OK
if the given name is valid as a
- * package name, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validatePackageName(
- String name, String sourceLevel, String complianceLevel) {
-
- if (name == null) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_package_nullName,
- null);
- }
- int length;
- if ((length = name.length()) == 0) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_package_emptyName,
- null);
- }
- if (name.charAt(0) == DOT || name.charAt(length - 1) == DOT) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_package_dotName,
- null);
- }
- if (CharOperation.isWhitespace(name.charAt(0))
- || CharOperation.isWhitespace(name.charAt(name.length() - 1))) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_package_nameWithBlanks,
- null);
- }
- int dot = 0;
- while (dot != -1 && dot < length - 1) {
- if ((dot = name.indexOf(DOT, dot + 1)) != -1
- && dot < length - 1
- && name.charAt(dot + 1) == DOT) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_package_consecutiveDotsName,
- null);
- }
- }
- // IWorkspace workspace = ResourcesPlugin.getWorkspace();
- StringTokenizer st = new StringTokenizer(name, "."); // $NON-NLS-1$
- boolean firstToken = true;
- IStatus warningStatus = null;
- while (st.hasMoreTokens()) {
- String typeName = st.nextToken();
- typeName = typeName.trim(); // grammar allows spaces
- char[] scannedID = scannedIdentifier(typeName, sourceLevel, complianceLevel);
- if (scannedID == null) {
- return new Status(
- IStatus.ERROR,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.bind(Messages.convention_illegalIdentifier, typeName),
- null);
- }
- // IStatus status = workspace.validateName(new String(scannedID), IResource.FOLDER);
- // if (!status.isOK()) {
- // return status;
- // }
- if (firstToken && scannedID.length > 0 && ScannerHelper.isUpperCase(scannedID[0])) {
- if (warningStatus == null) {
- warningStatus =
- new Status(
- IStatus.WARNING,
- org.eclipse.jdt.core.JavaCore.PLUGIN_ID,
- -1,
- Messages.convention_package_uppercaseName,
- null);
- }
- }
- firstToken = false;
- }
- if (warningStatus != null) {
- return warningStatus;
- }
- return JavaModelStatus.VERIFIED_OK;
- }
-
- /**
- * Validate a given classpath and output location for a project, using the following rules:
- *
- *
- *
- *
- * Note that the classpath entries are not validated automatically. Only bound variables or
- * containers are considered in the checking process (this allows to perform a consistency check
- * on a classpath which has references to yet non existing projects, folders, ...).
- *
- *
- *
- *
- * Note: Since 3.8, this behavior can be overridden by configuring {@link
- * org.eclipse.jdt.core.JavaCore#CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE}
- * IStatus.OK
if the given classpath and output
- * location are compatible, otherwise a status object indicating what is wrong with the
- * classpath or output location
- * @since 2.0
- */
- public static IJavaModelStatus validateClasspath(
- IJavaProject javaProject, IClasspathEntry[] rawClasspath, IPath projectOutputLocation) {
-
- // return ClasspathEntry.validateClasspath(javaProject, rawClasspath, projectOutputLocation);
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns a Java model status describing the problem related to this classpath entry if any, a
- * status object with code IStatus.OK
if the entry is fine (that is, if the given
- * classpath entry denotes a valid element to be referenced onto a classpath).
- *
- * @param project the given java project
- * @param entry the given classpath entry
- * @param checkSourceAttachment a flag to determine if source attachment should be checked
- * @return a java model status describing the problem related to this classpath entry if any, a
- * status object with code IStatus.OK
if the entry is fine
- * @since 2.0
- */
- public static IJavaModelStatus validateClasspathEntry(
- IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment) {
- // return ClasspathEntry.validateClasspathEntry(project, entry, checkSourceAttachment,
- // false/*not referred by container*/);
- throw new UnsupportedOperationException();
- }
-
- /**
- * Validate the given type variable name.
- *
- * "E"
.
- *
- * @param name the name of a type variable
- * @return a status object with code IStatus.OK
if the given name is valid as a type
- * variable name, otherwise a status object indicating what is wrong with the name
- * @since 3.1
- * @deprecated Use {@link #validateTypeVariableName(String id, String sourceLevel, String
- * complianceLevel)} instead
- */
- public static IStatus validateTypeVariableName(String name) {
- return validateIdentifier(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3);
- }
-
- /**
- * Validate the given type variable name for the given source and compliance levels.
- *
- * "E"
.
- *
- * @param name the name of a type variable
- * @param sourceLevel the source level
- * @param complianceLevel the compliance level
- * @return a status object with code IStatus.OK
if the given name is valid as a type
- * variable name, otherwise a status object indicating what is wrong with the name
- * @since 3.3
- */
- public static IStatus validateTypeVariableName(
- String name, String sourceLevel, String complianceLevel) {
- return validateIdentifier(name, sourceLevel, complianceLevel);
- }
-
- /**
- * Validate that all compiler options of the given project match keys and values described in
- * {@link org.eclipse.jdt.core.JavaCore#getDefaultOptions()} method.
- *
- * @param javaProject the given java project
- * @param inheritJavaCoreOptions inherit project options from JavaCore or not.
- * @return a status object with code IStatus.OK
if all project compiler options are
- * valid, otherwise a status object indicating what is wrong with the keys and their value.
- * @since 3.1 TODO (frederic) finalize for all possible options (JavaCore,
- * DefaultCodeFormatterOptions, AssistOptions) and open to API
- */
- /*
- public static IStatus validateCompilerOptions(IJavaProject javaProject, boolean inheritJavaCoreOptions) {
- return validateCompilerOptions(javaProject.getOptions(inheritJavaCoreOptions));
- }
- */
-
- /**
- * Validate that all compiler options of the given project match keys and values described in
- * {@link org.eclipse.jdt.core.JavaCore#getDefaultOptions()} method.
- *
- * @param compilerOptions Map of options
- * @return a status object with code IStatus.OK
if all compiler options are valid,
- * otherwise a status object indicating what is wrong with the keys and their value.
- * @since 3.1
- */
- /*
- public static IStatus validateCompilerOptions(Map compilerOptions) {
-
- // Get current options
- String compliance = (String) compilerOptions.get(JavaCore.COMPILER_COMPLIANCE);
- String source = (String) compilerOptions.get(JavaCore.COMPILER_SOURCE);
- String target = (String) compilerOptions.get(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM);
- if (compliance == null && source == null && target == null) {
- return JavaModelStatus.VERIFIED_OK; // default is OK
- }
-
- // Initialize multi-status
- List errors = new ArrayList();
-
- // Set default for compliance if necessary (not set on project and not inherited...)
- if (compliance == null) {
- compliance = JavaCore.getOption(JavaCore.COMPILER_COMPLIANCE);
- }
-
- // Verify compliance level value and set source and target default if necessary
- long complianceLevel = 0;
- long sourceLevel = 0;
- long targetLevel = 0;
- if (JavaCore.VERSION_1_3.equals(compliance)) {
- complianceLevel = ClassFileConstants.JDK1_3;
- if (source == null) {
- source = JavaCore.VERSION_1_3;
- sourceLevel = ClassFileConstants.JDK1_3;
- }
- if (target == null) {
- target = JavaCore.VERSION_1_1;
- targetLevel = ClassFileConstants.JDK1_1;
- }
- } else if (JavaCore.VERSION_1_4.equals(compliance)) {
- complianceLevel = ClassFileConstants.JDK1_4;
- if (source == null) {
- source = JavaCore.VERSION_1_3;
- sourceLevel = ClassFileConstants.JDK1_3;
- }
- if (target == null) {
- target = JavaCore.VERSION_1_2;
- targetLevel = ClassFileConstants.JDK1_2;
- }
- } else if (JavaCore.VERSION_1_5.equals(compliance)) {
- complianceLevel = ClassFileConstants.JDK1_5;
- if (source == null) {
- source = JavaCore.VERSION_1_5;
- sourceLevel = ClassFileConstants.JDK1_5;
- }
- if (target == null) {
- target = JavaCore.VERSION_1_5;
- targetLevel = ClassFileConstants.JDK1_5;
- }
- } else {
- // compliance is not valid
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.invalidCompilerOption", compliance==null?"":compliance, JavaCore.COMPILER_COMPLIANCE))); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Verify source value and set default for target if necessary
- if (JavaCore.VERSION_1_4.equals(source)) {
- sourceLevel = ClassFileConstants.JDK1_4;
- if (target == null) {
- target = JavaCore.VERSION_1_4;
- targetLevel = ClassFileConstants.JDK1_4;
- }
- } else if (JavaCore.VERSION_1_5.equals(source)) {
- sourceLevel = ClassFileConstants.JDK1_5;
- if (target == null) {
- target = JavaCore.VERSION_1_5;
- targetLevel = ClassFileConstants.JDK1_5;
- }
- } else if (JavaCore.VERSION_1_3.equals(source)) {
- sourceLevel = ClassFileConstants.JDK1_3;
- } else {
- // source is not valid
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.invalidCompilerOption", source==null?"":source, JavaCore.COMPILER_SOURCE))); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Verify target value
- if (targetLevel == 0) {
- targetLevel = CompilerOptions.versionToJdkLevel(target);
- if (targetLevel == 0) {
- // target is not valid
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.invalidCompilerOption", target==null?"":target, JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM))); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- // Check and set compliance/source/target compatibilities (only if they have valid values)
- if (complianceLevel != 0 && sourceLevel != 0 && targetLevel != 0) {
- // target must be 1.5 if source is 1.5
- if (sourceLevel >= ClassFileConstants.JDK1_5 && targetLevel < ClassFileConstants.JDK1_5) {
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.incompatibleTargetForSource", target, JavaCore.VERSION_1_5))); //$NON-NLS-1$
- }
- else
- // target must be 1.4 if source is 1.4
- if (sourceLevel >= ClassFileConstants.JDK1_4 && targetLevel < ClassFileConstants.JDK1_4) {
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.incompatibleTargetForSource", target, JavaCore.VERSION_1_4))); //$NON-NLS-1$
- }
- // target cannot be greater than compliance level
- if (complianceLevel < targetLevel){
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.incompatibleComplianceForTarget", compliance, JavaCore.VERSION_1_4))); //$NON-NLS-1$
- }
- // compliance must be 1.5 if source is 1.5
- if (source.equals(JavaCore.VERSION_1_5) && complianceLevel < ClassFileConstants.JDK1_5) {
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.incompatibleComplianceForSource", compliance, JavaCore.VERSION_1_5))); //$NON-NLS-1$
- } else
- // compliance must be 1.4 if source is 1.4
- if (source.equals(JavaCore.VERSION_1_4) && complianceLevel < ClassFileConstants.JDK1_4) {
- errors.add(new JavaModelStatus(IStatus.ERROR, Util.bind("convention.compiler.incompatibleComplianceForSource", compliance, JavaCore.VERSION_1_4))); //$NON-NLS-1$
- }
- }
-
- // Return status
- int size = errors.size();
- switch (size) {
- case 0:
- return JavaModelStatus.VERIFIED_OK;
- case 1:
- return (IStatus) errors.get(0);
- default:
- IJavaModelStatus[] allStatus = new IJavaModelStatus[size];
- errors.toArray(allStatus);
- return JavaModelStatus.newMultiStatus(allStatus);
- }
- }
- */
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/ToolFactory.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/ToolFactory.java
deleted file mode 100644
index dab52c3a567..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/ToolFactory.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * createCodeFormatter(options, M_FORMAT_NEW)
. Thus
- * some code formatter options may be ignored. See @{link {@link #M_FORMAT_NEW} for more details.
- *
- * @param options - the options map to use for formatting with the default code formatter.
- * Recognized options are documented on JavaCore#getDefaultOptions()
. If set to
- * null
, then use the current settings from JavaCore#getOptions
.
- * @return an instance of the built-in code formatter
- * @see org.eclipse.jdt.core.formatter.CodeFormatter
- * @see org.eclipse.jdt.core.JavaCore#getOptions()
- * @since 3.0
- */
- public static CodeFormatter createCodeFormatter(Map options) {
- return createCodeFormatter(options, M_FORMAT_NEW);
- }
-
- /**
- * Create an instance of the built-in code formatter.
- *
- * JavaCore#getDefaultOptions()
. If set to
- * null
, then use the current settings from JavaCore#getOptions
.
- * @param mode the given mode to modify the given options.
- * @return an instance of the built-in code formatter
- * @see org.eclipse.jdt.core.formatter.CodeFormatter
- * @see org.eclipse.jdt.core.JavaCore#getOptions()
- * @since 3.3
- */
- public static CodeFormatter createCodeFormatter(Map options, int mode) {
- if (options == null) options = org.eclipse.jdt.core.JavaCore.getOptions();
- Map currentOptions = new HashMap(options);
- if (mode == M_FORMAT_NEW) {
- // disable the option for not formatting comments starting on first column
- currentOptions.put(
- DefaultCodeFormatterConstants
- .FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN,
- DefaultCodeFormatterConstants.TRUE);
- // disable the option for not indenting comments starting on first column
- currentOptions.put(
- DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN,
- DefaultCodeFormatterConstants.FALSE);
- currentOptions.put(
- DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN,
- DefaultCodeFormatterConstants.FALSE);
- }
- return new DefaultCodeFormatter(currentOptions);
- }
-
- /**
- * Create a classfile bytecode disassembler, able to produce a String representation of a given
- * classfile.
- *
- * @return a classfile bytecode disassembler
- * @see org.eclipse.jdt.core.util.ClassFileBytesDisassembler
- * @since 2.1
- */
- public static ClassFileBytesDisassembler createDefaultClassFileBytesDisassembler() {
- return new Disassembler();
- }
-
- /**
- * Create a classfile bytecode disassembler, able to produce a String representation of a given
- * classfile.
- *
- * @return a classfile bytecode disassembler
- * @see org.eclipse.jdt.core.util.IClassFileDisassembler
- * @deprecated Use {@link #createDefaultClassFileBytesDisassembler()} instead
- */
- public static org.eclipse.jdt.core.util.IClassFileDisassembler
- createDefaultClassFileDisassembler() {
- class DeprecatedDisassembler extends Disassembler
- implements org.eclipse.jdt.core.util.IClassFileDisassembler {
- // for backward compatibility, defines a disassembler which implements IClassFileDisassembler
- }
- return new DeprecatedDisassembler();
- }
-
- /**
- * Create a classfile reader onto a classfile Java element. Create a default classfile reader,
- * able to expose the internal representation of a given classfile according to the decoding flag
- * used to initialize the reader. Answer null if the file named fileName doesn't represent a valid
- * .class file.
- *
- * JavaCore#getDefaultOptions()
. If set to null
,
- // then use
- // * the current settings from JavaCore#getOptions
.
- // * @return an instance of the built-in code formatter
- // * @see org.eclipse.jdt.core.ICodeFormatter
- // * @see org.eclipse.jdt.core.ToolFactory#createCodeFormatter()
- // * @see org.eclipse.jdt.core.JavaCore#getOptions()
- // * @deprecated Use {@link #createCodeFormatter(java.util.Map)} instead but note the different
- // options
- // */
- // public static ICodeFormatter createDefaultCodeFormatter(Map options){
- // if (options == null) options = org.eclipse.jdt.core.JavaCore.getOptions();
- // return new org.eclipse.jdt.internal.formatter.old.CodeFormatter(options);
- // }
- //
- // /**
- // * Create a scanner, indicating the level of detail requested for tokenizing. The scanner can
- // then be
- // * used to tokenize some source in a Java aware way.
- // * Here is a typical scanning loop:
- // *
- // *
- // *
- // *
- // *
- // * IScanner scanner = ToolFactory.createScanner(false, false, false, false);
- // * scanner.setSource("int i = 0;".toCharArray());
- // * while (true) {
- // * int token = scanner.getNextToken();
- // * if (token == ITerminalSymbols.TokenNameEOF) break;
- // * System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
- // * }
- // *
- // * false
, comments will be silently consumed
- // * @param tokenizeWhiteSpace if set to false
, white spaces will be silently
- // consumed,
- // * @param assertMode if set to false
, occurrences of 'assert' will be reported as
- // identifiers
- // * ({@link org.eclipse.jdt.core.compiler.ITerminalSymbols#TokenNameIdentifier}), whereas if set
- // to true
, it
- // * would report assert keywords ({@link
- // org.eclipse.jdt.core.compiler.ITerminalSymbols#TokenNameassert}). Java 1.4 has introduced
- // * a new 'assert' keyword.
- // * @param recordLineSeparator if set to true
, the scanner will record positions of
- // encountered line
- // * separator ends. In case of multi-character line separators, the last character position is
- // considered. These positions
- // * can then be extracted using {@link org.eclipse.jdt.core.compiler.IScanner#getLineEnds()}.
- // Only non-unicode escape sequences are
- // * considered as valid line separators.
- // * @return a scanner
- // * @see org.eclipse.jdt.core.compiler.IScanner
- // * @see #createScanner(boolean, boolean, boolean, String, String)
- // */
- // public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace,
- // boolean assertMode, boolean
- // recordLineSeparator){
- // // use default workspace compliance
- // long complianceLevelValue = CompilerOptions
- //
- // .versionToJdkLevel(org.eclipse.jdt.core.JavaCore.getOption(org.eclipse.jdt.core.JavaCore.COMPILER_COMPLIANCE));
- // if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_4; //
- // fault-tolerance
- // PublicScanner scanner =
- // new PublicScanner(
- // tokenizeComments,
- // tokenizeWhiteSpace,
- // false/*nls*/,
- // assertMode ? ClassFileConstants.JDK1_4 : ClassFileConstants.JDK1_3/*sourceLevel*/,
- // complianceLevelValue,
- // null/*taskTags*/,
- // null/*taskPriorities*/,
- // true/*taskCaseSensitive*/);
- // scanner.recordLineSeparator = recordLineSeparator;
- // return scanner;
- // }
- //
- // /**
- // * Create a scanner, indicating the level of detail requested for tokenizing. The scanner can
- // then be
- // * used to tokenize some source in a Java aware way.
- // * Here is a typical scanning loop:
- // *
- // *
- // *
- // *
- // *
- // * IScanner scanner = ToolFactory.createScanner(false, false, false, false);
- // * scanner.setSource("int i = 0;".toCharArray());
- // * while (true) {
- // * int token = scanner.getNextToken();
- // * if (token == ITerminalSymbols.TokenNameEOF) break;
- // * System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
- // * }
- // *
- // * false
, comments will be silently consumed
- // * @param tokenizeWhiteSpace if set to false
, white spaces will be silently
- // consumed,
- // * @param recordLineSeparator if set to true
, the scanner will record positions of
- // encountered line
- // * separator ends. In case of multi-character line separators, the last character position is
- // considered. These positions
- // * can then be extracted using {@link org.eclipse.jdt.core.compiler.IScanner#getLineEnds()}.
- // Only non-unicode escape sequences are
- // * considered as valid line separators.
- // * @param sourceLevel if set to "1.3"
or null
, occurrences
- // of 'assert' will be reported as
- // identifiers
- // * ({@link org.eclipse.jdt.core.compiler.ITerminalSymbols#TokenNameIdentifier}), whereas if set
- // to "1.4"
, it
- // * would report assert keywords ({@link
- // org.eclipse.jdt.core.compiler.ITerminalSymbols#TokenNameassert}). Java 1.4 has introduced
- // * a new 'assert' keyword.
- // * @return a scanner
- // * @see org.eclipse.jdt.core.compiler.IScanner
- // * @see #createScanner(boolean, boolean, boolean, String, String)
- // * @since 3.0
- // */
- // public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace,
- // boolean recordLineSeparator, String
- // sourceLevel) {
- // // use default workspace compliance
- // long complianceLevelValue =
- // CompilerOptions.versionToJdkLevel(org.eclipse.jdt.core.JavaCore.getOption(JavaCore
- // .COMPILER_COMPLIANCE));
- // if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_4; //
- // fault-tolerance
- // long sourceLevelValue = CompilerOptions.versionToJdkLevel(sourceLevel);
- // if (sourceLevelValue == 0) sourceLevelValue = ClassFileConstants.JDK1_3; // fault-tolerance
- // PublicScanner scanner =
- // new PublicScanner(
- // tokenizeComments,
- // tokenizeWhiteSpace,
- // false/*nls*/,
- // sourceLevelValue /*sourceLevel*/,
- // complianceLevelValue,
- // null/*taskTags*/,
- // null/*taskPriorities*/,
- // true/*taskCaseSensitive*/);
- // scanner.recordLineSeparator = recordLineSeparator;
- // return scanner;
- // }
- //
- // /**
- // * Create a scanner, indicating the level of detail requested for tokenizing. The scanner can
- // then be
- // * used to tokenize some source in a Java aware way.
- // * Here is a typical scanning loop:
- // *
- // *
- // *
- // *
- // * @param tokenizeComments if set to
- // * IScanner scanner = ToolFactory.createScanner(false, false, false, false);
- // * scanner.setSource("int i = 0;".toCharArray());
- // * while (true) {
- // * int token = scanner.getNextToken();
- // * if (token == ITerminalSymbols.TokenNameEOF) break;
- // * System.out.println(token + " : " + new String(scanner.getCurrentTokenSource()));
- // * }
- // *
- // * false
, comments will be silently consumed
- // * @param tokenizeWhiteSpace if set to false
, white spaces will be silently
- // consumed,
- // * @param recordLineSeparator if set to true
, the scanner will record positions of
- // encountered line
- // * separator ends. In case of multi-character line separators, the last character position is
- // considered. These positions
- // * can then be extracted using {@link org.eclipse.jdt.core.compiler.IScanner#getLineEnds()}.
- // Only non-unicode escape sequences are
- // * considered as valid line separators.
- // * @param sourceLevel if set to "1.3"
or null
, occurrences
- // of 'assert' will be reported as
- // identifiers
- // * ({@link org.eclipse.jdt.core.compiler.ITerminalSymbols#TokenNameIdentifier}), whereas if set
- // to "1.4"
, it
- // * would report assert keywords ({@link
- // org.eclipse.jdt.core.compiler.ITerminalSymbols#TokenNameassert}). Java 1.4 has introduced
- // * a new 'assert' keyword.
- // * @param complianceLevel This is used to support the Unicode 4.0 character sets. if set to 1.5
- // or above,
- // * the Unicode 4.0 is supported, otherwise Unicode 3.0 is supported.
- // * @return a scanner
- // * @see org.eclipse.jdt.core.compiler.IScanner
- // *
- // * @since 3.1
- // */
- // public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace,
- // boolean recordLineSeparator, String sourceLevel, String complianceLevel) {
- // PublicScanner scanner = null;
- // long sourceLevelValue = CompilerOptions.versionToJdkLevel(sourceLevel);
- // if (sourceLevelValue == 0) sourceLevelValue = ClassFileConstants.JDK1_3; // fault-tolerance
- // long complianceLevelValue = CompilerOptions.versionToJdkLevel(complianceLevel);
- // if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_4; //
- // fault-tolerance
- // scanner = new PublicScanner(tokenizeComments, tokenizeWhiteSpace,
- // false/*nls*/,sourceLevelValue /*sourceLevel*/, complianceLevelValue, null/*taskTags*/,
- // null/*taskPriorities*/, true/*taskCaseSensitive*/);
- // scanner.recordLineSeparator = recordLineSeparator;
- // return scanner;
- // }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/IVMInstallType.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/IVMInstallType.java
deleted file mode 100644
index 4eb4d1b30b8..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/IVMInstallType.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2007 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * "org.eclipse.jdt.launching.vmInstallTypes"
extension point.
- */
-public interface IVMInstallType {
- // /**
- // * Creates a new instance of this VM Install type.
- // * The newly created IVMInstall is managed by this IVMInstallType.
- // *
- // * @param id An id String that must be unique within this IVMInstallType.
- // *
- // * @return the newly created VM instance
- // *
- // * @throws IllegalArgumentException If the id exists already.
- // */
- // IVMInstall createVMInstall(String id);
- // /**
- // * Finds the VM with the given id.
- // *
- // * @param id the VM id
- // * @return a VM instance, or null
if not found
- // */
- // IVMInstall findVMInstall(String id);
- // /**
- // * Finds the VM with the given name.
- // *
- // * @param name the VM name
- // * @return a VM instance, or null
if not found
- // * @since 2.0
- // */
- // IVMInstall findVMInstallByName(String name);
- //
- // /**
- // * Remove the VM associated with the given id from the set of VMs managed by
- // * this VM type. Has no effect if a VM with the given id is not currently managed
- // * by this type.
- // * A VM install that is disposed may not be used anymore.
- // *
- // * @param id the id of the VM to be disposed.
- // */
- // void disposeVMInstall(String id);
- // /**
- // * Returns all VM instances managed by this VM type.
- // *
- // * @return the list of VM instances managed by this VM type
- // */
- // IVMInstall[] getVMInstalls();
-
- /**
- * Returns the display name of this VM type.
- *
- * @return the name of this IVMInstallType
- */
- String getName();
-
- /**
- * Returns the globally unique id of this VM type. Clients are responsible for providing a unique
- * id.
- *
- * @return the id of this IVMInstallType
- */
- String getId();
-
- /**
- * Validates the given location of a VM installation.
- *
- * null
- *
if they can't assure that a given vm install matches this IVMInstallType.
- *
- * @return The location of an VM installation that can be used with this VM install type, or
- * null
if unable to locate an installed VM.
- */
- File detectInstallLocation();
-
- /**
- * Returns a collection of LibraryLocation
s that represent the default system
- * libraries of this VM install type, if a VM was installed at the given installLocation
- *
. The returned LibraryLocation
s may not exist if the installLocation
- *
is not a valid install location.
- *
- * @param installLocation home location
- * @return default library locations based on the given installLocation
.
- * @see LibraryLocation
- * @see IVMInstallType#validateInstallLocation(java.io.File)
- * @since 2.0
- */
- LibraryLocation[] getDefaultLibraryLocations(File installLocation);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JREContainer.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JREContainer.java
deleted file mode 100644
index 32517b3f40d..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JREContainer.java
+++ /dev/null
@@ -1,479 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2013 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IAccessRule
s */
- private static IAccessRule[] EMPTY_RULES = new IAccessRule[0];
-
- /**
- * Map of {IVMInstall -> Map of {{IExeuctionEnvironment, IAccessRule[][]} -> {IClasspathEntry[]}}
- */
- private static MapIVMInstall
and an execution environment id
- *
- * @since 3.3
- */
- static class RuleKey {
- private String fEnvironmentId = null;
- private IVMInstallType fInstall = null;
-
- /**
- * Constructor
- *
- * @param install the VM
- * @param environmentId the environment
- */
- public RuleKey(IVMInstallType install, String environmentId) {
- fInstall = install;
- fEnvironmentId = environmentId;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof RuleKey) {
- RuleKey key = (RuleKey) obj;
- return fEnvironmentId.equals(key.fEnvironmentId) && fInstall.equals(key.fInstall);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- return fEnvironmentId.hashCode() + fInstall.hashCode();
- }
- }
-
- /**
- * Holds an entry for the cache of access rules/classpath entries. An entry is made up of an array
- * of classpath entries and the collection of access rules.
- *
- * @since 3.3
- */
- static class RuleEntry {
- private IAccessRule[][] fRules = null;
- private IClasspathEntry[] fEntries = null;
-
- /**
- * Constructor
- *
- * @param rules the rules
- * @param entries the entries
- */
- public RuleEntry(IAccessRule[][] rules, IClasspathEntry[] entries) {
- fRules = rules;
- fEntries = entries;
- }
-
- /**
- * Returns the collection of classpath entries for this RuleEntry
- *
- * @return the cached array of classpath entries
- */
- public IClasspathEntry[] getClasspathEntries() {
- return fEntries;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- IAccessRule[][] rules = null;
- if (obj instanceof RuleEntry) {
- rules = ((RuleEntry) obj).fRules;
- }
- if (obj instanceof IAccessRule[][]) {
- rules = (IAccessRule[][]) obj;
- }
- if (fRules == rules) {
- return true;
- }
- if (rules != null) {
- if (fRules.length == rules.length) {
- for (int i = 0; i < fRules.length; i++) {
- if (!rulesEqual(fRules[i], rules[i])) {
- return false;
- }
- }
- return true;
- }
- }
- return false;
- }
-
- /**
- * Checks if the two arrays of rules are equal (same rules in each position in the array)
- *
- * @param a First list of rules to compare, must not be null
- * @param b Second list of rules to compare, must not be null
- * @return true
if the arrays are equal, false
otherwise
- */
- private static boolean rulesEqual(IAccessRule[] a, IAccessRule[] b) {
- if (a == b) {
- return true;
- }
- if (a.length != b.length) {
- return false;
- }
- for (int j = 0; j < a.length; j++) {
- if (!a[j].equals(b[j])) {
- return false;
- }
- }
- return true;
- }
- }
-
- // /**
- // * Add a VM changed listener to clear cached values when a VM changes or is removed
- // */
- // static {
- // IVMInstallChangedListener listener = new IVMInstallChangedListener() {
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#defaultVMInstallChanged(org.eclipse.jdt.launching.IVMInstall, org
- // .eclipse.jdt.launching.IVMInstall)
- // */
- // public void defaultVMInstallChanged(IVMInstall previous, IVMInstall current) {}
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#vmAdded(org.eclipse.jdt.launching.IVMInstall)
- // */
- // public void vmAdded(IVMInstall newVm) {}
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#vmChanged(org.eclipse.jdt.launching.PropertyChangeEvent)
- // */
- // public void vmChanged(PropertyChangeEvent event) {
- // if (event.getSource() != null) {
- // fgClasspathEntries.remove(event.getSource());
- // removeRuleEntry(event.getSource());
- // }
- // }
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.IVMInstallChangedListener#vmRemoved(org.eclipse.jdt.launching.IVMInstall)
- // */
- // public void vmRemoved(IVMInstall removedVm) {
- // fgClasspathEntries.remove(removedVm);
- // removeRuleEntry(removedVm);
- // }
- //
- // /**
- // * Removes all occurrences of the given VM found as part key members in the current
- // * cache for classpath entries
- // * @param obj an object which should be castable to IVMInstall
- // */
- // private void removeRuleEntry(Object obj) {
- // if(obj instanceof IVMInstall) {
- // IVMInstall install = (IVMInstall) obj;
- // RuleKey key = null;
- // ArrayListnull
- * @return classpath entries
- */
- private static IClasspathEntry[] computeClasspathEntries(
- IVMInstallType vm, IJavaProject project, String environmentId) {
- LibraryLocation[] libs = null; // vm.getLibraryLocations();
- boolean overrideJavaDoc = false;
- if (libs == null) {
- libs = getLibraryLocations(vm);
- overrideJavaDoc = true;
- }
- IAccessRule[][] rules = null;
- // if (environmentId != null) {
- // compute access rules for execution environment
- IExecutionEnvironment environment = JavaRuntime.getEnvironment(environmentId);
- if (environment != null) {
- rules = environment.getAccessRules(vm, libs, project);
- }
- // }
- RuleKey key = null;
- if (vm != null && rules != null && environmentId != null) {
- key = new RuleKey(vm, environmentId);
- RuleEntry entry = fgClasspathEntriesWithRules.get(key);
- if (entry != null && entry.equals(rules)) {
- return entry.getClasspathEntries();
- }
- }
- Listnull
- * @param path container path used to resolve this JRE
- * @param project the project context
- */
- public JREContainer(IVMInstallType vm, IPath path, IJavaProject project) {
- fVMInstall = vm;
- fPath = path;
- fProject = project;
- }
-
- /** @see IClasspathContainer#getClasspathEntries() */
- public IClasspathEntry[] getClasspathEntries() {
- if (Launching.DEBUG_JRE_CONTAINER) {
- Launching.log(""org.eclipse.jdt.launching"
). */
- public static final String ID_PLUGIN = "org.eclipse.jdt.launching"; // $NON-NLS-1$
-
- public static boolean DEBUG_JRE_CONTAINER = false;
- /** Mapping of top-level VM installation directories to library info for that VM. */
- private static Map
- *
- * Mapping: Map<String,Long>
- */
- private static Mapnull
- *
if none.
- *
- * @param javaInstallPath the absolute path to the java executable
- * @return the library info that corresponds to the specified JRE install path, or null
- *
if none
- */
- public static LibraryInfo getLibraryInfo(String javaInstallPath) {
- if (fgLibraryInfoMap == null) {
- restoreLibraryInfo();
- }
- return fgLibraryInfoMap.get(javaInstallPath);
- }
-
- /** Restores library information for VMs */
- private static void restoreLibraryInfo() {
- fgLibraryInfoMap = new HashMapLaunchingPlugin
- *
- * @return the singleton instance of LaunchingPlugin
- */
- public static Launching getDefault() {
- if (fgLaunching == null) {
- fgLaunching = new Launching();
- }
- return fgLaunching;
- }
-
- /**
- * Logs the specified status
- *
- * @param status the status to log
- */
- public static void log(IStatus status) {
- // getDefault().getLog().log(status);
- LOG.error(status.getMessage(), status.getException());
- }
-
- /**
- * Logs the specified message, by creating a new Status
- *
- * @param message the message to log as an error status
- */
- public static void log(String message) {
- log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
- }
-
- /**
- * Logs the specified exception by creating a new Status
- *
- * @param e the {@link Throwable} to log as an error
- */
- public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, e.getMessage(), e));
- }
-
- /**
- * Convenience method which returns the unique identifier of this plug-in.
- *
- * @return the id of the {@link Launching}
- */
- public static String getUniqueIdentifier() {
- return ID_PLUGIN;
- }
-
- /**
- * Returns paths stored in XML
- *
- * @param lib the library path in {@link Element} form
- * @param pathType the type of the path
- * @return paths stored in XML
- */
- private static String[] getPathsFromXML(Element lib, String pathType) {
- Listtrue
if the time stamp has changed compared to the cached one or if there
- * is no recorded time stamp, false
otherwise.
- */
- public static boolean timeStampChanged(String location) {
- synchronized (installLock) {
- if (fgHasChanged.contains(location)) {
- return true;
- }
- File file = new File(location);
- if (file.exists()) {
- if (fgInstallTimeMap == null) {
- readInstallInfo();
- }
- Long stamp = fgInstallTimeMap.get(location);
- long fstamp = file.lastModified();
- if (stamp != null) {
- if (stamp.longValue() == fstamp) {
- return false;
- }
- }
- // if there is no recorded stamp we have to assume it is new
- stamp = new Long(fstamp);
- fgInstallTimeMap.put(location, stamp);
- writeInstallInfo();
- fgHasChanged.add(location);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Reads the file of saved time stamps and populates the {@link #fgInstallTimeMap}. See
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=266651 for more information
- *
- * @since 3.7
- */
- private static void readInstallInfo() {
- fgInstallTimeMap = new HashMapnull
to remove
- */
- public static void setLibraryInfo(String javaInstallPath, LibraryInfo info) {
- if (fgLibraryInfoMap == null) {
- restoreLibraryInfo();
- }
- if (info == null) {
- fgLibraryInfoMap.remove(javaInstallPath);
- if (fgInstallTimeMap != null) {
- fgInstallTimeMap.remove(javaInstallPath);
- writeInstallInfo();
- }
-
- } else {
- fgLibraryInfoMap.put(javaInstallPath, info);
- }
- // once the library info has been set we can forget it has changed
- fgHasChanged.remove(javaInstallPath);
- saveLibraryInfo();
- }
-
- /** Saves the library info in a local workspace state location */
- private static void saveLibraryInfo() {
- OutputStream stream = null;
- try {
- String xml = getLibraryInfoAsXML();
- IPath libPath = getDefault().getStateLocation();
- libPath = libPath.append("libraryInfos.xml"); // $NON-NLS-1$
- File file = libPath.toFile();
- if (!file.exists()) {
- file.createNewFile();
- }
- stream = new BufferedOutputStream(new FileOutputStream(file));
- stream.write(xml.getBytes("UTF8")); // $NON-NLS-1$
- } catch (IOException e) {
- log(e);
- } catch (CoreException e) {
- log(e);
- } finally {
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException e1) {
- }
- }
- }
- }
- /**
- * Return the VM definitions contained in this object as a String of XML. The String is suitable
- * for storing in the workbench preferences.
- *
- * parseXMLIntoContainer
.
- *
- * @return String the results of flattening this object into XML
- * @throws CoreException if this method fails. Reasons include:
- *
- *
- */
- private static String getLibraryInfoAsXML() throws CoreException {
-
- Document doc = newDocument();
- Element config = doc.createElement("libraryInfos"); // $NON-NLS-1$
- doc.appendChild(config);
-
- // Create a node for each info in the table
- Iteratornull
- * @throws CoreException if a problem is encountered
- */
- private static void abort(String message, Throwable exception) throws CoreException {
- IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), ERROR, message, exception);
- throw new CoreException(status);
- }
-
- /**
- * Writes out the mappings of SDK install time stamps to disk. See
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=266651 for more information.
- */
- private static void writeInstallInfo() {
- if (fgInstallTimeMap != null) {
- OutputStream stream = null;
- try {
- Document doc = newDocument();
- Element root = doc.createElement("dirs"); // $NON-NLS-1$
- doc.appendChild(root);
- Map.Entrytrue
if the URLs are equal, false
otherwise
- * @since 3.5
- */
- public static boolean sameURL(URL url1, URL url2) {
- if (url1 == url2) {
- return true;
- }
- if (url1 == null ^ url2 == null) {
- return false;
- }
- // check if URL are file: URL as we may have two URL pointing to the same doc location
- // but with different representation - (i.e. file:/C;/ and file:C:/)
- final boolean isFile1 = "file".equalsIgnoreCase(url1.getProtocol()); // $NON-NLS-1$
- final boolean isFile2 = "file".equalsIgnoreCase(url2.getProtocol()); // $NON-NLS-1$
- if (isFile1 && isFile2) {
- File file1 = new File(url1.getFile());
- File file2 = new File(url2.getFile());
- return file1.equals(file2);
- }
- // URL1 XOR URL2 is a file, return false. (They either both need to be files, or neither)
- if (isFile1 ^ isFile2) {
- return false;
- }
- return getExternalForm(url1).equals(getExternalForm(url2));
- }
-
- /**
- * Gets the external form of this URL. In particular, it trims any white space, removes a trailing
- * slash and creates a lower case string.
- *
- * @param url the URL to get the {@link String} value of
- * @return the lower-case {@link String} form of the given URL
- */
- private static String getExternalForm(URL url) {
- String externalForm = url.toExternalForm();
- if (externalForm == null) {
- return ""; // $NON-NLS-1$
- }
- externalForm = externalForm.trim();
- if (externalForm.endsWith("/")) { // $NON-NLS-1$
- // Remove the trailing slash
- externalForm = externalForm.substring(0, externalForm.length() - 1);
- }
- return externalForm.toLowerCase();
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/LibraryInfo.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/LibraryInfo.java
deleted file mode 100644
index b7bc9d58be9..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/LibraryInfo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c) 2000,
- * 2005 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * null
- *
.
- * @param sourcePath The location of the zip file containing the sources for library
- * Must not be null
(Use Path.EMPTY instead)
- * @param packageRoot The path inside the source
zip file where packages names begin.
- * If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the
- * zip file, the packageRoot should be "src" Must not be null
. (Use Path.EMPTY or
- * IPath.ROOT)
- * @throws IllegalArgumentException If the library path is null
.
- */
- public LibraryLocation(IPath libraryPath, IPath sourcePath, IPath packageRoot) {
- this(libraryPath, sourcePath, packageRoot, null);
- }
-
- /**
- * Creates a new library location.
- *
- * @param libraryPath The location of the JAR containing java.lang.Object Must not be null
- *
.
- * @param sourcePath The location of the zip file containing the sources for library
- * Must not be null
(Use Path.EMPTY instead)
- * @param packageRoot The path inside the source
zip file where packages names begin.
- * If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the
- * zip file, the packageRoot should be "src" Must not be null
. (Use Path.EMPTY or
- * IPath.ROOT)
- * @param javadocLocation The location of the javadoc for library
- * @throws IllegalArgumentException If the library path is null
.
- * @since 3.1
- */
- public LibraryLocation(
- IPath libraryPath, IPath sourcePath, IPath packageRoot, URL javadocLocation) {
- this(libraryPath, sourcePath, packageRoot, javadocLocation, null);
- }
-
- /**
- * Creates a new library location.
- *
- * @param libraryPath The location of the JAR containing java.lang.Object Must not be null
- *
.
- * @param sourcePath The location of the zip file containing the sources for library
- * Must not be null
(Use Path.EMPTY instead)
- * @param packageRoot The path inside the source
zip file where packages names begin.
- * If the source for java.lang.Object source is found at "src/java/lang/Object.java" in the
- * zip file, the packageRoot should be "src" Must not be null
. (Use Path.EMPTY or
- * IPath.ROOT)
- * @param javadocLocation The location of the javadoc for library
- * @param indexLocation The location of the index for library
- * @throws IllegalArgumentException If the library path is null
.
- * @since 3.7
- */
- public LibraryLocation(
- IPath libraryPath,
- IPath sourcePath,
- IPath packageRoot,
- URL javadocLocation,
- URL indexLocation) {
- if (libraryPath == null) {
- throw new IllegalArgumentException("library cannot be null");
- }
- fSystemLibrary = libraryPath;
- fSystemLibrarySource = sourcePath;
- fPackageRootPath = packageRoot;
- fJavadocLocation = javadocLocation;
- fIndexLocation = indexLocation;
- }
-
- /**
- * Returns the JRE library jar location.
- *
- * @return The JRE library jar location.
- */
- public IPath getSystemLibraryPath() {
- return fSystemLibrary;
- }
-
- /**
- * Returns the JRE library source zip location.
- *
- * @return The JRE library source zip location.
- */
- public IPath getSystemLibrarySourcePath() {
- return fSystemLibrarySource;
- }
-
- /**
- * Returns the path to the default package in the sources zip file
- *
- * @return The path to the default package in the sources zip file.
- */
- public IPath getPackageRootPath() {
- return fPackageRootPath;
- }
-
- /**
- * Returns the Javadoc location associated with this Library location.
- *
- * @return a {@link java.net.URL} pointing to the Javadoc location associated with this Library
- * location, or null
if none
- * @since 3.1
- */
- public URL getJavadocLocation() {
- return fJavadocLocation;
- }
-
- /**
- * Returns the index location associated with this library location.
- *
- * @return a {@link java.net.URL} pointing to the index location associated with this Library
- * location, or null
if none
- * @since 3.7
- */
- public URL getIndexLocation() {
- return fIndexLocation;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof LibraryLocation) {
- LibraryLocation lib = (LibraryLocation) obj;
- return getSystemLibraryPath().equals(lib.getSystemLibraryPath())
- && equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath())
- && equals(getPackageRootPath(), lib.getPackageRootPath())
- && Launching.sameURL(getJavadocLocation(), lib.getJavadocLocation());
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- return getSystemLibraryPath().hashCode();
- }
-
- /**
- * Returns whether the given paths are equal - either may be null
.
- *
- * @param path1 path to be compared
- * @param path2 path to be compared
- * @return whether the given paths are equal
- */
- protected boolean equals(IPath path1, IPath path2) {
- return equalsOrNull(path1, path2);
- }
-
- /**
- * Returns whether the given objects are equal - either may be null
.
- *
- * @param o1 object to be compared
- * @param o2 object to be compared
- * @return whether the given objects are equal or both null
- * @since 3.1
- */
- private boolean equalsOrNull(Object o1, Object o2) {
- if (o1 == null) {
- return o2 == null;
- }
- if (o2 == null) {
- return false;
- }
- return o1.equals(o2);
- }
-
- /**
- * Sets the JRE library source zip location.
- *
- * @param source the source to set
- * @since 3.4
- */
- public void setSystemLibrarySource(IPath source) {
- fSystemLibrarySource = source;
- }
-
- /**
- * Sets the index location to the given {@link java.net.URL}.
- *
- * @param indexLoc
- * @since 3.7
- */
- public void setIndexLocation(URL indexLoc) {
- fIndexLocation = indexLoc;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/StandardVMType.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/StandardVMType.java
deleted file mode 100644
index 0669fd2a498..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/StandardVMType.java
+++ /dev/null
@@ -1,778 +0,0 @@
-/**
- * ***************************************************************************** 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 http://www.eclipse.org/legal/epl-v10.html
- *
- *
- * Note: Must be omitted for Standard11xVM!
- * Note: Must be at least -Xmx16m for JRockit, see bug 433455.
- *
- * @since 3.7.100
- */
- public static final String MIN_VM_SIZE = "-Xmx16m"; // $NON-NLS-1$
-
- /**
- * Name filter for files ending in .jar or .zip
- *
- * @since 3.7.0
- */
- private static FilenameFilter fgArchiveFilter =
- new FilenameFilter() {
- public boolean accept(File arg0, String arg1) {
- return arg1.endsWith(".zip") || arg1.endsWith(".jar"); // $NON-NLS-1$//$NON-NLS-2$
- }
- };
-
- /** The root path for the attached source */
- private String fDefaultRootPath = ""; // $NON-NLS-1$
-
- /**
- * Map of the install path for which we were unable to generate the library info during this
- * session.
- */
- private static Map
- *
- * Map<{@link String}, {@link LibraryLocation}>
- *
- * @since 3.7
- */
- private static MapFile
object, otherwise return null
.
- *
- * @param vmInstallLocation the {@link java.io.File} location to look in
- * @return the {@link java.io.File} for the Java executable or null
- */
- public static File findJavaExecutable(File vmInstallLocation) {
- // Try each candidate in order. The first one found wins. Thus, the order
- // of fgCandidateJavaLocations and fgCandidateJavaFiles is significant.
- for (int i = 0; i < fgCandidateJavaFiles.length; i++) {
- for (int j = 0; j < fgCandidateJavaLocations.length; j++) {
- File javaFile =
- new File(vmInstallLocation, fgCandidateJavaLocations[j] + fgCandidateJavaFiles[i]);
- if (javaFile.isFile()) {
- return javaFile;
- }
- }
- }
- return null;
- }
-
- // /**
- // * Returns the listing of {@link ILibraryLocationResolver}s
- // *
- // * @return the known list of {@link ILibraryLocationResolver}s
- // * @since 3.7.0
- // */
- // private static ILibraryLocationResolver[] getLibraryLocationResolvers() {
- // if (fgLibraryLocationResolvers == null) {
- // IExtensionPoint extensionPoint =
- // Platform.getExtensionRegistry().getExtensionPoint(Launching.ID_PLUGIN,
- // JavaRuntime
- //
- // .EXTENSION_POINT_LIBRARY_LOCATION_RESOLVERS);
- // IConfigurationElement[] configs = extensionPoint.getConfigurationElements();
- // Listnull
- */
- protected synchronized LibraryInfo getLibraryInfo(File javaHome, File javaExecutable) {
- String installPath = javaHome.getAbsolutePath();
- LibraryInfo info = Launching.getLibraryInfo(installPath);
- if (info == null || Launching.timeStampChanged(installPath)) {
- // Todo IDEX-1255 Incorrect log message
- // info = fgFailedInstallPath.get(installPath);
- // if (info == null) {
- // info = generateLibraryInfo(javaHome, javaExecutable);
- // if (info == null) {
- info = getDefaultLibraryInfo(javaHome);
- fgFailedInstallPath.put(installPath, info);
- // } else {
- // // only persist if we were able to generate information - see bug 70011
- // Launching.setLibraryInfo(installPath, info);
- // }
- // }
- }
- return info;
- }
-
- /**
- * Return true
if the appropriate system libraries can be found for the specified
- * java executable, false
otherwise.
- *
- * @param javaHome the Java home folder
- * @param javaExecutable the Java executable file
- * @return true
if the default system libraries can be detected for the given install
- * location false
otherwise
- */
- protected boolean canDetectDefaultSystemLibraries(File javaHome, File javaExecutable) {
- LibraryLocation[] locations = getDefaultLibraryLocations(javaHome);
- String version = getVMVersion(javaHome, javaExecutable);
- return locations.length > 0 && !version.startsWith("1.1"); // $NON-NLS-1$
- }
-
- /**
- * Returns the version of the VM at the given location, with the given executable.
- *
- * @param javaHome the Java home folder
- * @param javaExecutable the Java executable file
- * @return String
- */
- protected String getVMVersion(File javaHome, File javaExecutable) {
- LibraryInfo info = getLibraryInfo(javaHome, javaExecutable);
- return info.getVersion();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.launching.IVMInstallType#detectInstallLocation()
- */
- public File detectInstallLocation() {
- // do not detect on the Mac OS
- // if (Platform.getOS().equals(Constants.OS_MACOSX)) {
- // return null;
- // }
-
- // Retrieve the 'java.home' system property. If that directory doesn't exist,
- // return null.
- File javaHome;
- try {
- javaHome = new File(System.getProperty("java.home")).getCanonicalFile(); // $NON-NLS-1$
- } catch (IOException e) {
- Launching.log(e);
- return null;
- }
- if (!javaHome.exists()) {
- return null;
- }
-
- // Find the 'java' executable file under the java home directory. If it can't be
- // found, return null.
- File javaExecutable = findJavaExecutable(javaHome);
- if (javaExecutable == null) {
- return null;
- }
-
- // If the reported java home directory terminates with 'jre', first see if
- // the parent directory contains the required libraries
- boolean foundLibraries = false;
- if (javaHome.getName().equalsIgnoreCase(JRE)) {
- File parent = new File(javaHome.getParent());
- if (canDetectDefaultSystemLibraries(parent, javaExecutable)) {
- javaHome = parent;
- foundLibraries = true;
- }
- }
-
- // If we haven't already found the libraries, look in the reported java home dir
- if (!foundLibraries) {
- if (!canDetectDefaultSystemLibraries(javaHome, javaExecutable)) {
- return null;
- }
- }
-
- return javaHome;
- }
-
- /**
- * Return an IPath
corresponding to the single library file containing the standard
- * Java classes for most VMs version 1.2 and above.
- *
- * @param javaHome the Java home folder
- * @return the {@link IPath} to the rt.jar
file
- */
- protected IPath getDefaultSystemLibrary(File javaHome) {
- IPath jreLibPath = new Path(javaHome.getPath()).append(LIB).append(RT_JAR);
- if (jreLibPath.toFile().isFile()) {
- return jreLibPath;
- }
- return new Path(javaHome.getPath()).append(JRE).append(LIB).append(RT_JAR);
- }
-
- /**
- * Returns a path to the source attachment for the given library, or an empty path if none.
- *
- * @param libLocation the {@link java.io.File} location of the library to find the source for
- * @return a path to the source attachment for the given library, or an empty path if none
- */
- protected IPath getDefaultSystemLibrarySource(File libLocation) {
- File parent = libLocation.getParentFile();
- while (parent != null) {
- File parentsrc = new File(parent, SRC_JAR);
- if (parentsrc.isFile()) {
- setDefaultRootPath(SRC);
- return new Path(parentsrc.getPath());
- }
- parentsrc = new File(parent, SRC_ZIP);
- if (parentsrc.isFile()) {
- setDefaultRootPath(""); // $NON-NLS-1$
- return new Path(parentsrc.getPath());
- }
- parent = parent.getParentFile();
- }
- // if we didn't find any of the normal source files, look for J9 source
- IPath result = checkForJ9LibrarySource(libLocation);
- if (result != null) {
- return result;
- }
- // check for null
if an extension directory is not
- * supported.
- *
- * @param installLocation the VM install location
- * @return default extension directory or null
- */
- protected File getDefaultExtensionDirectory(File installLocation) {
- File jre = null;
- if (installLocation.getName().equalsIgnoreCase(JRE)) {
- jre = installLocation;
- } else {
- jre = new File(installLocation, JRE);
- }
- File lib = new File(jre, LIB);
- File ext = new File(lib, "ext"); // $NON-NLS-1$
- return ext;
- }
-
- /**
- * Returns the default location of the endorsed directory, based on the given install location.
- * The resulting file may not exist, or be null
if an endorsed directory is not
- * supported.
- *
- * @param installLocation the VM install location
- * @return default endorsed directory or null
- */
- protected File getDefaultEndorsedDirectory(File installLocation) {
- File lib = new File(installLocation, LIB);
- File ext = new File(lib, "endorsed"); // $NON-NLS-1$
- return ext;
- }
-
- protected String getDefaultRootPath() {
- return fDefaultRootPath;
- }
-
- protected void setDefaultRootPath(String defaultRootPath) {
- fDefaultRootPath = defaultRootPath;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.launching.IVMInstallType#validateInstallLocation(java.io.File)
- */
- public IStatus validateInstallLocation(File javaHome) {
- IStatus status = null;
- File javaExecutable = findJavaExecutable(javaHome);
- if (javaExecutable == null) {
- status =
- new Status(
- IStatus.ERROR,
- Launching.getUniqueIdentifier(),
- 0,
- "Target is not a JDK Root. Java executable was not " + "found",
- null); //
- } else {
- if (canDetectDefaultSystemLibraries(javaHome, javaExecutable)) {
- status = new Status(IStatus.OK, Launching.getUniqueIdentifier(), 0, "ok", null);
- } else {
- status =
- new Status(
- IStatus.ERROR,
- Launching.getUniqueIdentifier(),
- 0,
- "Target is not a JDK root. System library was not" + " " + "found.",
- null);
- }
- }
- return status;
- }
-
- /**
- * Generates library information for the given java executable. A main program is run (
- * org.eclipse.jdt.internal.launching.support.
- * LibraryDetector
), that dumps the system properties for bootpath and extension
- * directories. This output is then parsed and cached for future reference.
- *
- * @param javaHome the Java home folder
- * @param javaExecutable the Java executable file
- * @return library info or null
if none
- */
- protected LibraryInfo generateLibraryInfo(File javaHome, File javaExecutable) {
- LibraryInfo info = null;
-
- // if this is 1.1.X, the properties will not exist
- IPath classesZip =
- new Path(javaHome.getAbsolutePath()).append(LIB).append("classes.zip"); // $NON-NLS-1$
- if (classesZip.toFile().exists()) {
- return new LibraryInfo(
- "1.1.x",
- new String[] {classesZip.toOSString()},
- new String[0],
- new String[0]); // $NON-NLS-1$
- }
- // //locate the launching support jar - it contains the main program to run
- // File file = Launching.getFileInPlugin(new Path("lib/launchingsupport.jar")); //$NON-NLS-1$
- // if (file != null && file.exists()) {
- // String javaExecutablePath = javaExecutable.getAbsolutePath();
- // String[] cmdLine = new String[] { javaExecutablePath, MIN_VM_SIZE,
- // "-classpath", file.getAbsolutePath(),
- // "org.eclipse.jdt.internal.launching.support.LibraryDetector" }; //$NON-NLS-1$
- // $NON-NLS-2$
- // Process p = null;
- // try {
- // String envp[] = null;
- //// if (Platform.OS_MACOSX.equals(Platform.getOS())) {
- //// Mapnull
- // */
- // protected LibraryInfo parseLibraryInfo(IProcess process) {
- // IStreamsProxy streamsProxy = process.getStreamsProxy();
- // String text = null;
- // if (streamsProxy != null) {
- // text = streamsProxy.getOutputStreamMonitor().getContents();
- // }
- // if (text != null && text.length() > 0) {
- // int index = text.indexOf(BAR);
- // if (index > 0) {
- // String version = text.substring(0, index);
- // text = text.substring(index + 1);
- // index = text.indexOf(BAR);
- // if (index > 0) {
- // String bootPaths = text.substring(0, index);
- // String[] bootPath = parsePaths(bootPaths);
- //
- // text = text.substring(index + 1);
- // index = text.indexOf(BAR);
- //
- // if (index > 0) {
- // String extDirPaths = text.substring(0, index);
- // String endorsedDirsPath = text.substring(index + 1);
- // String[] extDirs = parsePaths(extDirPaths);
- // String[] endDirs = parsePaths(endorsedDirsPath);
- // return new LibraryInfo(version, bootPath, extDirs, endDirs);
- // }
- // }
- // }
- // }
- // return null;
- // }
-
- protected String[] parsePaths(String paths) {
- Listnull
.
- *
- * @param version language version such as "1.4"
- * @return URL to default Javadoc location, or null
- */
- public static URL getDefaultJavadocLocation(String version) {
- try {
- if (version.startsWith(org.eclipse.jdt.core.JavaCore.VERSION_1_8)) {
- return new URL("https://docs.oracle.com/javase/8/docs/api/"); // $NON-NLS-1$
- } else if (version.startsWith(org.eclipse.jdt.core.JavaCore.VERSION_1_7)) {
- return new URL("https://docs.oracle.com/javase/7/docs/api/"); // $NON-NLS-1$
- } else if (version.startsWith(org.eclipse.jdt.core.JavaCore.VERSION_1_6)) {
- return new URL("https://docs.oracle.com/javase/6/docs/api/"); // $NON-NLS-1$
- } else if (version.startsWith(org.eclipse.jdt.core.JavaCore.VERSION_1_5)) {
- return new URL("https://docs.oracle.com/javase/1.5.0/docs/api/"); // $NON-NLS-1$
- } else if (version.startsWith(org.eclipse.jdt.core.JavaCore.VERSION_1_4)) {
- // archived: http://download.oracle.com/javase/1.4.2/docs/api/
- return new URL("https://docs.oracle.com/javase/1.5.0/docs/api/"); // $NON-NLS-1$
- } else if (version.startsWith(org.eclipse.jdt.core.JavaCore.VERSION_1_3)) {
- // archived: http://download.oracle.com/javase/1.3/docs/api/
- return new URL("https://docs.oracle.com/javase/1.5.0/docs/api/"); // $NON-NLS-1$
- }
- } catch (MalformedURLException e) {
- }
- return null;
- }
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/DefaultAccessRuleParticipant.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/DefaultAccessRuleParticipant.java
deleted file mode 100644
index adc5b156178..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/DefaultAccessRuleParticipant.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IConfigurationElement
- // */
- // private IConfigurationElement fElement;
-
- /** Environment specific rule participant or null
if none. */
- private IAccessRuleParticipant fRuleParticipant;
-
- /** OSGi profile properties or null
if none. */
- private Properties fProfileProperties;
-
- /** Whether profile properties have been initialized */
- private boolean fPropertiesInitialized;
-
- // /**
- // * Set of compatible vm's - just the strictly compatible ones
- // */
- // private Setnull
if none */
- private IVMInstallType fDefault = null;
-
- /** Cache of access rule participants to consider for this environment. */
- private IAccessRuleParticipant[] fParticipants = null;
-
- /**
- * Map of {IVMInstall -> Map of {participant -> IAccessRule[][]}}. Caches access rules returned by
- * each participant for a given VM.
- *
- * @since 3.3
- */
- private MapEnvironmentsManager
*/
- private void init() {
- // EnvironmentsManager.getDefault().initializeCompatibilities();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.launching.environments.IExecutionEnvironment#getId()
- */
- public String getId() {
- // return fElement.getAttribute("id"); //$NON-NLS-1$
- // throw new UnsupportedOperationException();
- return id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.launching.environments.IExecutionEnvironment#getDescription()
- */
- public String getDescription() {
- // return fElement.getAttribute("description"); //$NON-NLS-1$
- throw new UnsupportedOperationException();
- }
-
- // /* (non-Javadoc)
- // * @see org.eclipse.jdt.launching.environments.IExecutionEnvironment#getCompatibleVMs()
- // */
- // public IVMInstallType[] getCompatibleVMs() {
- // init();
- // return fCompatibleVMs.toArray(new IVMInstall[fCompatibleVMs.size()]);
- // }
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.environments.IExecutionEnvironment#isStrictlyCompatible(org.eclipse.jdt.launching.IVMInstall)
- // */
- // public boolean isStrictlyCompatible(IVMInstall vm) {
- // init();
- // return fStrictlyCompatible.contains(vm);
- // }
- //
- // /* (non-Javadoc)
- // * @see org.eclipse.jdt.launching.environments.IExecutionEnvironment#getDefaultVM()
- // */
- // public IVMInstall getDefaultVM() {
- // init();
- // return fDefault;
- // }
- //
- // /* (non-Javadoc)
- // * @see
- // org.eclipse.jdt.launching.environments.IExecutionEnvironment#setDefaultVM(org.eclipse.jdt.launching.IVMInstall)
- // */
- // public void setDefaultVM(IVMInstall vm) {
- // init();
- // if (vm != null && !fCompatibleVMs.contains(vm)) {
- // throw new IllegalArgumentException(NLS.bind(EnvironmentMessages.EnvironmentsManager_0, new
- // String[]{getId()}));
- // }
- // if (vm != null && vm.equals(fDefault)) {
- // return;
- // }
- // fDefault = vm;
- // EnvironmentsManager.getDefault().updateDefaultVMs();
- // // update classpath containers
- // rebindClasspathContainers();
- // }
-
- // /**
- // * Updates Java projects referencing this environment, if any.
- // */
- // private void rebindClasspathContainers() {
- // IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
- // if (model != null) {
- // try {
- // List> libLists =
- new ArrayList
>(); // array of lists of access rules
- for (int i = 0; i < libraries.length; i++) {
- libLists.add(new ArrayList
> collect) {
- for (int i = 0; i < accessRules.length; i++) {
- IAccessRule[] libRules = accessRules[i];
- List
null
if none.
- *
- * @param bundle bundle to locate file in
- * @param path bundle relative path to properties file
- * @return properties or null
if none
- */
- private Properties getJavaProfileProperties() {
- URL profileURL = getClass().getResource("/" + id + ".profile"); // bundle.getEntry(path);
- if (profileURL != null) {
- InputStream is = null;
- try {
- // profileURL = FileLocator.resolve(profileURL);
- is = profileURL.openStream();
- if (is != null) {
- Properties profile = new Properties();
- profile.load(is);
- return profile;
- }
- } catch (IOException e) {
- } finally {
- try {
- if (is != null) {
- is.close();
- }
- } catch (IOException e) {
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.launching.environments.IExecutionEnvironment#getSubEnvironments()
- */
- public IExecutionEnvironment[] getSubEnvironments() {
- // Properties properties = getProfileProperties();
- // Setlibraries
, possibly empty.
- *
- * @param environment the environment that access rules are requested for
- * @param vm the vm that access rules are requested for
- * @param libraries the libraries that access rules are requested for
- * @param project the project the access rules are requested for or null
if none
- * @return a collection of arrays of access rules - one array per library, possibly empty
- * @since 3.3
- */
- public IAccessRule[][] getAccessRules(
- IExecutionEnvironment environment,
- IVMInstallType vm,
- LibraryLocation[] libraries,
- IJavaProject project);
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/IExecutionEnvironment.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/IExecutionEnvironment.java
deleted file mode 100644
index e52d7e5ee13..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/environments/IExecutionEnvironment.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IVMInstall
- *
).
- *
- *
- * org.eclipse.jdt.launching.executionEnvironments
extension point.
- *
- * id
- * attribute in plug-in XML.
- *
- * @return unique identifier of this execution environment
- */
- public String getId();
-
- /**
- * Returns a brief human-readable description of this environment.
- *
- * @return brief human-readable description of this environment.
- */
- public String getDescription();
-
- // /**
- // * Returns a collection of VM installs compatible with this environment,
- // * possibly empty.
- // *
- // * @return a collection of VM installs compatible with this environment,
- // * possibly empty.
- // */
- // public IVMInstall[] getCompatibleVMs();
- //
- // /**
- // * Returns whether the specified VM install is strictly compatible with
- // * this environment. Returns true
to indicate the VM install
- // * is strictly compatible with this environment and false
to indicate
- // * the VM install represents a superset of this environment.
- // *
- // * @param vm VM install
- // * @return whether the VM install is strictly compatible with this environment
- // */
- // public boolean isStrictlyCompatible(IVMInstall vm);
- //
- // /**
- // * Returns the VM that is used by default for this execution environment,
- // * or null
if none.
- // *
- // * @return default VM for this environment or null
if none
- // */
- // public IVMInstall getDefaultVM();
- //
- // /**
- // * Sets the VM to use by default for this execution environment.
- // *
- // * @param vm VM to use by default for this execution environment,
- // * or null
to clear the default setting
- // * @exception IllegalArgumentException if the given VM is not compatible with
- // * this environment
- // */
- // public void setDefaultVM(IVMInstall vm);
-
- /**
- * Returns a collection of access rules to be applied to the specified VM libraries for this
- * execution environment in the context of the given project. An array of access rules is returned
- * for each library specified by libraries
, possibly empty.
- *
- * org.eclipse.jdt.launching.executionEnvironments
extension.
- *
- * @param vm the VM that access rules are requested for
- * @param libraries the libraries that access rules are requested for
- * @param project the project the access rules are requested for or null
if none
- * @return a collection of arrays of access rules - one array per library
- * @since 3.3
- */
- public IAccessRule[][] getAccessRules(
- IVMInstallType vm, LibraryLocation[] libraries, IJavaProject project);
-
- /**
- * Returns the OSGi profile properties associated with this execution environment or null
- *
if none. Profile properties specify attributes such as {@link
- * org.osgi.framework.Constants#FRAMEWORK_SYSTEMPACKAGES}. Profile properties can be optionally
- * contributed with an execution environment extension.
- *
- * @return associated profile properties or null
if none
- * @since 3.5
- */
- public Properties getProfileProperties();
-
- /**
- * Returns a collection of execution environments that are subsets of this environment.
- *
- * @return a collection of execution environments that are subsets of this environment
- * @since 3.5
- */
- public IExecutionEnvironment[] getSubEnvironments();
-
- /**
- * Returns a map of Eclipse Java compiler options specified as default settings to use when
- * building with this profile, or null
if unspecified.
- *
- * @return a map of Eclipse Java compiler options associated with this profile or null
- *
- * @since 3.5
- */
- public MapIAdaptable
interface; extensions are managed by the
- * platform's adapter manager.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @see org.eclipse.core.resources.IResource
- * @see Platform#getAdapterManager()
- */
-public interface IResourceDelta extends org.eclipse.core.resources.IResourceDelta {
-
- /**
- * Returns a handle for the affected resource.
- *
- * ADDED
), this handle describes the newly-added resource; i.e.,
- * the one in the "after" state.
- *
- * CHANGED
), this handle also describes the resource in the "after"
- * state. When a file or folder resource has changed type, the former type of the handle can be
- * inferred.
- *
- * REMOVED
), this handle describes the resource in the "before"
- * state. Even though this resource would not normally exist in the current workspace, the type of
- * resource that was removed can be determined from the handle.
- *
- * ADDED_PHANTOM
and REMOVED_PHANTOM
- *
), this is the handle of the phantom resource.
- *
- * @return the affected resource (handle)
- */
- @Deprecated
- public File getFile();
-
- @Override
- IResource getResource();
-}
diff --git a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/resources/ResourceChangedEvent.java b/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/resources/ResourceChangedEvent.java
deleted file mode 100644
index 418776c27d2..00000000000
--- a/plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/resources/ResourceChangedEvent.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * ***************************************************************************** Copyright (c)
- * 2012-2015 Red Hat, Inc. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * IExtendedModifier
- *
)
- */
- private void printModifiers(List