Search in sources :

Example 6 with ResourceAlreadyExists

use of org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists in project webtools.sourceediting by eclipse.

the class URLModelProvider method getNewModelForRead.

public IStructuredModel getNewModelForRead(IFile iFile) {
    if (iFile == null)
        return null;
    IModelManager manager = getModelManager();
    if (manager == null)
        return null;
    IStructuredModel model = null;
    try {
        model = manager.getNewModelForEdit(iFile, false);
    } catch (IOException ex) {
    } catch (ResourceInUse riu) {
    } catch (ResourceAlreadyExists rae) {
    } catch (CoreException ce) {
    }
    return model;
}
Also used : CoreException(org.eclipse.core.runtime.CoreException) IModelManager(org.eclipse.wst.sse.core.internal.provisional.IModelManager) IStructuredModel(org.eclipse.wst.sse.core.internal.provisional.IStructuredModel) IOException(java.io.IOException) ResourceAlreadyExists(org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists) ResourceInUse(org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse)

Example 7 with ResourceAlreadyExists

use of org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists in project webtools.sourceediting by eclipse.

the class URLModelProvider method getNewModelForEdit.

public IStructuredModel getNewModelForEdit(IFile iFile) {
    if (iFile == null)
        return null;
    IModelManager manager = getModelManager();
    if (manager == null)
        return null;
    IStructuredModel model = null;
    try {
        model = manager.getNewModelForEdit(iFile, false);
    } catch (IOException ex) {
    } catch (ResourceInUse riu) {
    } catch (ResourceAlreadyExists rae) {
    } catch (CoreException ce) {
    }
    return model;
}
Also used : CoreException(org.eclipse.core.runtime.CoreException) IModelManager(org.eclipse.wst.sse.core.internal.provisional.IModelManager) IStructuredModel(org.eclipse.wst.sse.core.internal.provisional.IStructuredModel) IOException(java.io.IOException) ResourceAlreadyExists(org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists) ResourceInUse(org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse)

Aggregations

ResourceAlreadyExists (org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceAlreadyExists)7 IStructuredModel (org.eclipse.wst.sse.core.internal.provisional.IStructuredModel)6 ResourceInUse (org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse)5 IOException (java.io.IOException)4 CoreException (org.eclipse.core.runtime.CoreException)4 IModelManager (org.eclipse.wst.sse.core.internal.provisional.IModelManager)4 IFile (org.eclipse.core.resources.IFile)1 IDocumentLoader (org.eclipse.wst.sse.core.internal.document.IDocumentLoader)1 IModelHandler (org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)1 IStructuredDocument (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)1