edu.cmu.sei.osate.workspace
Class IResourceUtility

java.lang.Object
  extended by edu.cmu.sei.osate.workspace.IResourceUtility

public class IResourceUtility
extends java.lang.Object


Field Summary
static org.eclipse.core.runtime.QualifiedName ResourceWithSyntaxErrors
          the qualified name for tagging an aaxl file as invalid due to syntax errors in text file
 
Constructor Summary
IResourceUtility()
           
 
Method Summary
static boolean containsModelTaggedWithSyntaxErrors(org.eclipse.core.resources.IResource ires)
          check whether the ires IResource is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors
static org.eclipse.core.resources.IFile getComplementFile(org.eclipse.core.resources.IFile origfile)
          get the complement file for the given deleted file
static org.eclipse.core.resources.IFolder getComplementFolder(org.eclipse.core.resources.IFolder origfolder)
          get the complement file for the given deleted file
static boolean isAadlFile(org.eclipse.core.resources.IResource file)
           
static boolean isAaxlFile(org.eclipse.core.resources.IResource file)
          is file with aaxl extension, i.e., both decl models and instance models
static boolean isDiagramFile(org.eclipse.core.resources.IResource file)
          is file an AADL diagram file
static boolean isInstanceFile(org.eclipse.core.resources.IResource file)
          is file an AADL instance model
static boolean isModelFile(org.eclipse.core.resources.IResource file)
          is file an AADL object model (aaxl file with declarative AADL model)
static boolean isModelTaggedWithSyntaxErrors(org.eclipse.core.resources.IResource modelfile)
          check whether the model IResource is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors
static void tagModelWithSyntaxErrors(org.eclipse.core.resources.IResource modelfile)
          tag the IResource of the model is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors It is also touched to make sure it has a newer date than the text.
static void untagModelWithSyntaxErrors(org.eclipse.core.resources.IResource modelfile)
          untag the IResource of the model is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ResourceWithSyntaxErrors

public static final org.eclipse.core.runtime.QualifiedName ResourceWithSyntaxErrors
the qualified name for tagging an aaxl file as invalid due to syntax errors in text file

Constructor Detail

IResourceUtility

public IResourceUtility()
Method Detail

tagModelWithSyntaxErrors

public static void tagModelWithSyntaxErrors(org.eclipse.core.resources.IResource modelfile)
tag the IResource of the model is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors It is also touched to make sure it has a newer date than the text.

Parameters:
modelfile - IResource of aaxl model

untagModelWithSyntaxErrors

public static void untagModelWithSyntaxErrors(org.eclipse.core.resources.IResource modelfile)
untag the IResource of the model is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors

Parameters:
modelfile - IResource of aaxl model

isModelTaggedWithSyntaxErrors

public static boolean isModelTaggedWithSyntaxErrors(org.eclipse.core.resources.IResource modelfile)
check whether the model IResource is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors

Parameters:
modelfile - aaxl file
Returns:
true if it is tagged as its aadl text equivalent having syntax errors; false if no syntax error or the IResource does not exist

containsModelTaggedWithSyntaxErrors

public static boolean containsModelTaggedWithSyntaxErrors(org.eclipse.core.resources.IResource ires)
check whether the ires IResource is tagged with syntax errors i.e., its corresponding aadl text file has syntax errors

Parameters:
ires - project, folder, or IResource
Returns:
true if it contains a IResource that is tagged as its aadl text equivalent having syntax errors

isAadlFile

public static boolean isAadlFile(org.eclipse.core.resources.IResource file)

isAaxlFile

public static boolean isAaxlFile(org.eclipse.core.resources.IResource file)
is file with aaxl extension, i.e., both decl models and instance models

Parameters:
file -
Returns:
true if extension is aaxl

isDiagramFile

public static boolean isDiagramFile(org.eclipse.core.resources.IResource file)
is file an AADL diagram file


isInstanceFile

public static boolean isInstanceFile(org.eclipse.core.resources.IResource file)
is file an AADL instance model


isModelFile

public static boolean isModelFile(org.eclipse.core.resources.IResource file)
is file an AADL object model (aaxl file with declarative AADL model)


getComplementFile

public static org.eclipse.core.resources.IFile getComplementFile(org.eclipse.core.resources.IFile origfile)
get the complement file for the given deleted file

Parameters:
origfile -

getComplementFolder

public static org.eclipse.core.resources.IFolder getComplementFolder(org.eclipse.core.resources.IFolder origfolder)
get the complement file for the given deleted file

Parameters:
origfolder -