The Meta-Environment API

org.meta_environment.eclipse.files
Class BuildResults

java.lang.Object
  extended by toolbus.adapter.AbstractTool
      extended by toolbus.adapter.java.AbstractJavaTool
          extended by toolbus.adapter.eclipse.EclipseTool
              extended by org.meta_environment.eclipse.files.BuildResults
All Implemented Interfaces:
toolbus.IOperations

public class BuildResults
extends toolbus.adapter.eclipse.EclipseTool


Nested Class Summary
private static class BuildResults.InstanceKeeper
           
 
Field Summary
private static java.lang.String BIN_FOLDER
           
private static java.lang.String EXTENSION_SEPARATOR
           
 
Fields inherited from class toolbus.adapter.eclipse.EclipseTool
factory, TIME_OUT
 
Fields inherited from class toolbus.adapter.AbstractTool
DIRECTTOOL, REMOTETOOL, termFactory, toolBridge
 
Fields inherited from interface toolbus.IOperations
ACKDO, ACKEVENT, CONNECT, DEBUGPERFORMANCESTATS, DISCONNECT, DO, END, EVAL, EVENT, PERFORMANCESTATS, REQUEST, RESPONSE, TERMINATE, UNDEFINED, VALUE
 
Constructor Summary
private BuildResults()
           
 
Method Summary
 void cleanBuild(java.lang.String sourcePathStr, java.lang.String targetExt)
           
private  org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IPath targetPath)
           
private  org.eclipse.core.resources.IFile createLibraryTargetFile(java.lang.String sourcePathStr, java.lang.String targetExt)
          Workaround for not having a feature for libraries.
private  org.eclipse.core.resources.IFile createTargetFile(java.lang.String targetExt, org.eclipse.core.resources.IFile sourceFile)
           
private  org.eclipse.core.resources.IFile getFile(java.lang.String source)
           
static BuildResults getInstance()
           
private  org.eclipse.core.resources.IFile getTargetFile(java.lang.String sourcePathStr, java.lang.String targetExt)
           
 aterm.ATerm loadBuild(java.lang.String sourcePathStr, java.lang.String targetExt)
           
 aterm.ATerm loadStrBuild(java.lang.String sourcePathStr, java.lang.String targetExt)
           
 void saveBuild(java.lang.String sourcePathStr, java.lang.String targetExt, aterm.ATerm content)
           
 void saveBuild(java.lang.String sourcePathStr, java.lang.String targetExt, java.lang.String content)
           
 
Methods inherited from class toolbus.adapter.eclipse.EclipseTool
connect, connect, decode, getName, receiveAckEvent, receiveTerminate
 
Methods inherited from class toolbus.adapter.java.AbstractJavaTool
connectDirectly
 
Methods inherited from class toolbus.adapter.AbstractTool
disconnect, getFactory, getToolBridge, pack, sendEvent, sendRequest, setToolBridge, terminate, unpack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIN_FOLDER

private static final java.lang.String BIN_FOLDER
See Also:
Constant Field Values

EXTENSION_SEPARATOR

private static final java.lang.String EXTENSION_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

BuildResults

private BuildResults()
Method Detail

getInstance

public static BuildResults getInstance()

saveBuild

public void saveBuild(java.lang.String sourcePathStr,
                      java.lang.String targetExt,
                      java.lang.String content)

saveBuild

public void saveBuild(java.lang.String sourcePathStr,
                      java.lang.String targetExt,
                      aterm.ATerm content)

cleanBuild

public void cleanBuild(java.lang.String sourcePathStr,
                       java.lang.String targetExt)

loadBuild

public aterm.ATerm loadBuild(java.lang.String sourcePathStr,
                             java.lang.String targetExt)

loadStrBuild

public aterm.ATerm loadStrBuild(java.lang.String sourcePathStr,
                                java.lang.String targetExt)

getTargetFile

private org.eclipse.core.resources.IFile getTargetFile(java.lang.String sourcePathStr,
                                                       java.lang.String targetExt)
                                                throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createTargetFile

private org.eclipse.core.resources.IFile createTargetFile(java.lang.String targetExt,
                                                          org.eclipse.core.resources.IFile sourceFile)
                                                   throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createLibraryTargetFile

private org.eclipse.core.resources.IFile createLibraryTargetFile(java.lang.String sourcePathStr,
                                                                 java.lang.String targetExt)
                                                          throws org.eclipse.core.runtime.CoreException
Workaround for not having a feature for libraries. As a heuristic, we recognize libraries if they are in a "library" subdir and store the build results in "tmp" project. TODO remove this code and have an implementation of a search path with jars

Throws:
org.eclipse.core.runtime.CoreException

createFile

private org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IProject project,
                                                    org.eclipse.core.runtime.IPath targetPath)
                                             throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getFile

private org.eclipse.core.resources.IFile getFile(java.lang.String source)

The Meta-Environment API