Package org.eclipse.dltk.internal.ui.editor

Examples of org.eclipse.dltk.internal.ui.editor.ModelElementHyperlink


      }
      if (elements != null && elements.length > 0) {
        final IHyperlink link;
        if (elements.length == 1) {
          link = new ModelElementHyperlink(wordRegion, elements[0],
              new OpenAction(editor));
        } else {
          link = new ModelElementHyperlink(wordRegion,
              new ModelElementArray(elements), new OpenAction(
                  editor) {

                public void selectAndOpen(
                    IModelElement[] elements) {
View Full Code Here


      set.add(sourceModule.getResource().getLocation().toOSString());
      ISourceModule includedSourceModule = FileNetworkUtility
          .findSourceModule(sourceModule, includeVisitor.getFile(),
              set);
      if (includedSourceModule != null) {
        return new IHyperlink[] { new ModelElementHyperlink(
            includeVisitor.getSelectRegion(), includedSourceModule,
            new OpenAction(editor)) };
      }
    }
    return null;
View Full Code Here

            }
            if (types != null && types.length > 0) {
               
                IHyperlink[] links = new IHyperlink[types.length];
                for (int i=0; i < types.length; i++) {
                    links[i] = new ModelElementHyperlink(wordRegion, types[i], new OpenAction(site));
                }
               
                return links;
            }
View Full Code Here

        IMethod method = field.getMethod();
        IDLTKSearchScope scope = SearchEngine.createSearchScope(field.getSourceModule());
        IMethod[] methods = model.findMethods(method.getElementName(), MatchRule.EXACT, 0, 0, scope, null);
       
        if (methods.length == 1) {                   
          links[i++] = new ModelElementHyperlink(wordRegion, methods[0], new OpenAction(editor));;
        }
      }
     
      if (links.length > 0) {
        return links;
View Full Code Here

      try {
        String action = tpl.substring(0, tpl.indexOf("."));
       
        if (action.length() > 0) {         
          IMethod method = controller.getMethod(action + "Action");         
          return new ModelElementHyperlink(wordRegion, method, new OpenAction(editor));
        }
      } catch (Exception e) {
        // ignore and open the controller
      }
     
      return new ModelElementHyperlink(wordRegion, controller, new OpenAction(editor));
     
    }   
   
    return null;
  }
View Full Code Here

   
    path += viewPath.getTemplate();   
    ISourceModule module = folder.getSourceModule(path);
   
    if (module != null) {     
      return new ModelElementHyperlink(wordRegion, module, new OpenAction(editor));   
    }
       
    return null;
   
  }
View Full Code Here

      IType type = SymfonyModelAccess.getDefault().findEntity(alias, input.getScriptProject());
     
      if (type == null)
        return null;
     
      IHyperlink link = new ModelElementHyperlink(wordRegion, type, new OpenAction(editor));
     
      return new IHyperlink[] { link };
     
    } catch (Exception e) {   
      Logger.logException(e);     
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.internal.ui.editor.ModelElementHyperlink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.