Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.eclipse.jdt.graph
Class GraphUtil  view GraphUtil download GraphUtil.java

java.lang.Object
  extended bycom.port80.eclipse.jdt.graph.GraphUtil

public class GraphUtil
extends java.lang.Object


Field Summary
private static boolean DEBUG
           
private static java.lang.String fOutDir
           
private static java.lang.String NAME
           
private static boolean VERBOSE
           
 
Constructor Summary
GraphUtil()
           
 
Method Summary
static void addClassFile(org.eclipse.jdt.core.IClassFile binary, org.eclipse.jdt.core.IJavaProject project, com.port80.graph.IGraph graph, java.util.Map filemap, IGraphAction action)
           
static void addCompilateUnit(org.eclipse.jdt.core.ICompilationUnit unit, com.port80.graph.IGraph graph, java.util.Map filemap, IGraphAction action)
           
static java.lang.String addToFileMap(org.eclipse.jdt.core.ICompilationUnit unit, java.util.Map filemap)
          Add mapping FullTypeName-> ICompilationUnit full path for all types defined in the given ICompilationUnit.
static void addUnitsFromFragment(org.eclipse.jdt.core.IPackageFragment fragment, com.port80.graph.IGraph graph, java.util.Map filemap, IGraphAction action, org.eclipse.core.runtime.IProgressMonitor monitor)
           
private static void addUnitsFromFragments(java.lang.Object[] fragments, com.port80.graph.IGraph graph, java.util.Map filemap, IGraphAction action, org.eclipse.core.runtime.IProgressMonitor monitor)
           
static java.lang.String chop(java.lang.String str, int max)
          Truncate string.
static java.util.Set findVerticesFromTypenames(java.util.Set typenames, com.port80.graph.IGraph graph, java.util.Map filemap)
          Find the vertices for the given typenames if exists.
static java.lang.String getFullMethodName(org.eclipse.jdt.core.dom.IMethodBinding method)
           
static java.lang.String getFullTypeName(org.eclipse.jdt.core.dom.IBinding binding)
           
static java.lang.String getLabel(java.lang.String typename)
          Extract a proper label string from the given type name.
static java.lang.String getMethodParamSignature(org.eclipse.jdt.core.dom.IMethodBinding method)
          Method signature with simple name instead of full typenames.
static java.lang.String getMethodSignature(org.eclipse.jdt.core.dom.IMethodBinding method)
          Method signature with full typenames.
static java.lang.String getSimpleMethodName(org.eclipse.jdt.core.dom.IMethodBinding method)
          Method name without type qualifier and parameter signatures.
static java.lang.String getSimpleMethodParamSignature(org.eclipse.jdt.core.dom.IMethodBinding method)
          Method signature with simple name instead of full typenames.
static java.lang.String getSimpleTypeName(org.eclipse.jdt.core.dom.ITypeBinding type)
          Simple typename without package qualifiers.
static com.port80.graph.IVertex newVertex(java.lang.String name, com.port80.graph.IGraph graph)
          Create a new vertex in the given graph with the given name.
static void resolveReferences(java.lang.Object[] selected, com.port80.graph.IGraph graph, java.util.Map filemap, IGraphAction action, org.eclipse.core.runtime.IProgressMonitor monitor)
           
static boolean saveGraph(com.port80.graph.IGraph graph)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

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

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

VERBOSE

private static final boolean VERBOSE
See Also:
Constant Field Values

fOutDir

private static java.lang.String fOutDir
Constructor Detail

GraphUtil

public GraphUtil()
Method Detail

saveGraph

public static boolean saveGraph(com.port80.graph.IGraph graph)

resolveReferences

public static void resolveReferences(java.lang.Object[] selected,
                                     com.port80.graph.IGraph graph,
                                     java.util.Map filemap,
                                     IGraphAction action,
                                     org.eclipse.core.runtime.IProgressMonitor monitor)

findVerticesFromTypenames

public static java.util.Set findVerticesFromTypenames(java.util.Set typenames,
                                                      com.port80.graph.IGraph graph,
                                                      java.util.Map filemap)
Find the vertices for the given typenames if exists.


getLabel

public static java.lang.String getLabel(java.lang.String typename)
Extract a proper label string from the given type name.


newVertex

public static com.port80.graph.IVertex newVertex(java.lang.String name,
                                                 com.port80.graph.IGraph graph)
Create a new vertex in the given graph with the given name. If vertex of given name already exists, return the existing vertex.


addToFileMap

public static java.lang.String addToFileMap(org.eclipse.jdt.core.ICompilationUnit unit,
                                            java.util.Map filemap)
Add mapping FullTypeName-> ICompilationUnit full path for all types defined in the given ICompilationUnit.


addUnitsFromFragments

private static void addUnitsFromFragments(java.lang.Object[] fragments,
                                          com.port80.graph.IGraph graph,
                                          java.util.Map filemap,
                                          IGraphAction action,
                                          org.eclipse.core.runtime.IProgressMonitor monitor)

addUnitsFromFragment

public static void addUnitsFromFragment(org.eclipse.jdt.core.IPackageFragment fragment,
                                        com.port80.graph.IGraph graph,
                                        java.util.Map filemap,
                                        IGraphAction action,
                                        org.eclipse.core.runtime.IProgressMonitor monitor)

addClassFile

public static void addClassFile(org.eclipse.jdt.core.IClassFile binary,
                                org.eclipse.jdt.core.IJavaProject project,
                                com.port80.graph.IGraph graph,
                                java.util.Map filemap,
                                IGraphAction action)

addCompilateUnit

public static void addCompilateUnit(org.eclipse.jdt.core.ICompilationUnit unit,
                                    com.port80.graph.IGraph graph,
                                    java.util.Map filemap,
                                    IGraphAction action)

getFullTypeName

public static java.lang.String getFullTypeName(org.eclipse.jdt.core.dom.IBinding binding)

getSimpleTypeName

public static java.lang.String getSimpleTypeName(org.eclipse.jdt.core.dom.ITypeBinding type)
Simple typename without package qualifiers.


getFullMethodName

public static java.lang.String getFullMethodName(org.eclipse.jdt.core.dom.IMethodBinding method)

getSimpleMethodName

public static java.lang.String getSimpleMethodName(org.eclipse.jdt.core.dom.IMethodBinding method)
Method name without type qualifier and parameter signatures.


getMethodSignature

public static java.lang.String getMethodSignature(org.eclipse.jdt.core.dom.IMethodBinding method)
Method signature with full typenames.


getMethodParamSignature

public static java.lang.String getMethodParamSignature(org.eclipse.jdt.core.dom.IMethodBinding method)
Method signature with simple name instead of full typenames.


getSimpleMethodParamSignature

public static java.lang.String getSimpleMethodParamSignature(org.eclipse.jdt.core.dom.IMethodBinding method)
Method signature with simple name instead of full typenames.


chop

public static java.lang.String chop(java.lang.String str,
                                    int max)
Truncate string.