Class DirtyResource
- java.lang.Object
-
- com._1c.g5.modeling.xtext.ui.resource.DirtyResource
-
- All Implemented Interfaces:
com.google.inject.Provider<org.eclipse.xtext.resource.IResourceDescription>
,javax.inject.Provider<org.eclipse.xtext.resource.IResourceDescription>
,org.eclipse.xtext.ui.editor.IDirtyResource
public class DirtyResource extends Object implements org.eclipse.xtext.ui.editor.IDirtyResource, com.google.inject.Provider<org.eclipse.xtext.resource.IResourceDescription>
Dirty resource implementation.This implementation holds dirty state by default resource serialization mechanism.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.ui.editor.IDirtyResource
org.eclipse.xtext.ui.editor.IDirtyResource.ICurrentStateProvidingExtension, org.eclipse.xtext.ui.editor.IDirtyResource.InitializationAware, org.eclipse.xtext.ui.editor.IDirtyResource.NormalizedURISupportExtension
-
-
Constructor Summary
Constructors Constructor Description DirtyResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(org.eclipse.emf.ecore.resource.Resource resource)
Connects given resource.void
copyState(org.eclipse.xtext.resource.IResourceDescription original)
Copies resource state.void
disconnect(org.eclipse.emf.ecore.resource.Resource resource)
Clears dirty resource state.org.eclipse.xtext.resource.IResourceDescription
get()
Callback method for the copied resource description.String
getActualContents()
String
getContents()
org.eclipse.xtext.resource.IResourceDescription
getDescription()
org.eclipse.emf.common.util.URI
getURI()
protected void
initiallyProcessResource(org.eclipse.emf.ecore.resource.Resource resource)
boolean
isInitialized()
-
-
-
Method Detail
-
connect
public void connect(org.eclipse.emf.ecore.resource.Resource resource)
Connects given resource. This implementation stores current resource stated (content and resource description).- Parameters:
resource
- resource (notnull
).- Throws:
IllegalArgumentException
- if given resource is null.
-
disconnect
public void disconnect(org.eclipse.emf.ecore.resource.Resource resource)
Clears dirty resource state.- Parameters:
resource
- resource (notnull
).- Throws:
IllegalArgumentException
- if given resource is null.IllegalStateException
- if given resource not identically equals with resource given inconnect(Resource)
.
-
copyState
public void copyState(org.eclipse.xtext.resource.IResourceDescription original)
Copies resource state.- Parameters:
original
-IResourceDescription
instance (notnull
).
-
get
public org.eclipse.xtext.resource.IResourceDescription get()
Callback method for the copied resource description. Is triggered as soon as somebody is interested in the reference descriptions which shall be up to date all the time. This allows for lazy resolution of proxies instead of eager copying.- Specified by:
get
in interfacecom.google.inject.Provider<org.eclipse.xtext.resource.IResourceDescription>
- Specified by:
get
in interfacejavax.inject.Provider<org.eclipse.xtext.resource.IResourceDescription>
- Returns:
- the current resource description of the associated resource. May be
null
.
-
getActualContents
public String getActualContents()
- Specified by:
getActualContents
in interfaceorg.eclipse.xtext.ui.editor.IDirtyResource
-
getContents
public String getContents()
- Specified by:
getContents
in interfaceorg.eclipse.xtext.ui.editor.IDirtyResource
-
getDescription
public org.eclipse.xtext.resource.IResourceDescription getDescription()
- Specified by:
getDescription
in interfaceorg.eclipse.xtext.ui.editor.IDirtyResource
-
getURI
public org.eclipse.emf.common.util.URI getURI()
- Specified by:
getURI
in interfaceorg.eclipse.xtext.ui.editor.IDirtyResource
-
isInitialized
public boolean isInitialized()
-
initiallyProcessResource
protected void initiallyProcessResource(org.eclipse.emf.ecore.resource.Resource resource)
-
-