org.eclipse.mylar.internal.java
Class JavaStructureBridge

java.lang.Object
  extended by org.eclipse.mylar.context.core.AbstractContextStructureBridge
      extended by org.eclipse.mylar.internal.java.JavaStructureBridge

public class JavaStructureBridge
extends org.eclipse.mylar.context.core.AbstractContextStructureBridge

Author:
Mik Kersten

Field Summary
static java.lang.String CONTENT_TYPE
           
 java.util.List<org.eclipse.mylar.context.core.AbstractRelationProvider> providers
           
 
Fields inherited from class org.eclipse.mylar.context.core.AbstractContextStructureBridge
DOS_0_LABEL, DOS_1_LABEL, DOS_2_LABEL, DOS_3_LABEL, DOS_4_LABEL, DOS_5_LABEL, parentContentType
 
Constructor Summary
JavaStructureBridge()
           
 
Method Summary
 boolean acceptsObject(java.lang.Object object)
          TODO: figure out if the non IJavaElement stuff is needed
 boolean canBeLandmark(java.lang.String handle)
           
 boolean canFilter(java.lang.Object object)
          Uses special rules for classpath containers since these do not have an associated interest, i.e. they're not IJavaElement(s).
 boolean containsProblem(org.eclipse.mylar.context.core.IMylarElement node)
          Some copying from:
 java.lang.Object getAdaptedParent(java.lang.Object object)
           
 java.util.List<java.lang.String> getChildHandles(java.lang.String handle)
           
 java.lang.String getContentType()
           
 java.lang.String getContentType(java.lang.String elementHandle)
           
 java.util.List<org.eclipse.mylar.context.core.IDegreeOfSeparation> getDegreesOfSeparation()
           
private  boolean getErrorTicksFromMarkers(org.eclipse.core.resources.IResource res, int depth, org.eclipse.jdt.core.ISourceReference sourceElement)
           
 java.lang.String getHandleForOffsetInObject(java.lang.Object resource, int offset)
           
 java.lang.String getHandleIdentifier(java.lang.Object object)
          Uses resource-compatible path for projects
 java.lang.String getName(java.lang.Object object)
           
 java.lang.Object getObjectForHandle(java.lang.String handle)
           
 java.lang.String getParentHandle(java.lang.String handle)
           
 java.util.List<org.eclipse.mylar.context.core.AbstractRelationProvider> getRelationshipProviders()
           
private  java.lang.String getWtpElementHandle(java.lang.Object object)
          TODO: remove after WTP 1.5.1 is generally available
 boolean isDocument(java.lang.String handle)
           
private  boolean isWtpClass(java.lang.Object object)
           
 
Methods inherited from class org.eclipse.mylar.context.core.AbstractContextStructureBridge
getParentContentType, setParentContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final java.lang.String CONTENT_TYPE
See Also:
Constant Field Values

providers

public java.util.List<org.eclipse.mylar.context.core.AbstractRelationProvider> providers
Constructor Detail

JavaStructureBridge

public JavaStructureBridge()
Method Detail

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getAdaptedParent

public java.lang.Object getAdaptedParent(java.lang.Object object)
Overrides:
getAdaptedParent in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getParentHandle

public java.lang.String getParentHandle(java.lang.String handle)
Specified by:
getParentHandle in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getChildHandles

public java.util.List<java.lang.String> getChildHandles(java.lang.String handle)
Specified by:
getChildHandles in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getObjectForHandle

public java.lang.Object getObjectForHandle(java.lang.String handle)
Specified by:
getObjectForHandle in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getHandleIdentifier

public java.lang.String getHandleIdentifier(java.lang.Object object)
Uses resource-compatible path for projects

Specified by:
getHandleIdentifier in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getWtpElementHandle

private java.lang.String getWtpElementHandle(java.lang.Object object)
TODO: remove after WTP 1.5.1 is generally available


isWtpClass

private boolean isWtpClass(java.lang.Object object)

getName

public java.lang.String getName(java.lang.Object object)
Specified by:
getName in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

canBeLandmark

public boolean canBeLandmark(java.lang.String handle)
Specified by:
canBeLandmark in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

acceptsObject

public boolean acceptsObject(java.lang.Object object)
TODO: figure out if the non IJavaElement stuff is needed

Specified by:
acceptsObject in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

canFilter

public boolean canFilter(java.lang.Object object)
Uses special rules for classpath containers since these do not have an associated interest, i.e. they're not IJavaElement(s).

Specified by:
canFilter in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

isDocument

public boolean isDocument(java.lang.String handle)
Specified by:
isDocument in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getHandleForOffsetInObject

public java.lang.String getHandleForOffsetInObject(java.lang.Object resource,
                                                   int offset)
Specified by:
getHandleForOffsetInObject in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getContentType

public java.lang.String getContentType(java.lang.String elementHandle)
Specified by:
getContentType in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getRelationshipProviders

public java.util.List<org.eclipse.mylar.context.core.AbstractRelationProvider> getRelationshipProviders()
Specified by:
getRelationshipProviders in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

getDegreesOfSeparation

public java.util.List<org.eclipse.mylar.context.core.IDegreeOfSeparation> getDegreesOfSeparation()
Specified by:
getDegreesOfSeparation in class org.eclipse.mylar.context.core.AbstractContextStructureBridge

containsProblem

public boolean containsProblem(org.eclipse.mylar.context.core.IMylarElement node)
Some copying from:

See Also:
ProblemsLabelDecorator

getErrorTicksFromMarkers

private boolean getErrorTicksFromMarkers(org.eclipse.core.resources.IResource res,
                                         int depth,
                                         org.eclipse.jdt.core.ISourceReference sourceElement)
                                  throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException