Package org.eclipse.xtext.xbase.ui.launching

Examples of org.eclipse.xtext.xbase.ui.launching.JavaElementDelegate


 
  public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
    if (adaptableObject instanceof JavaElementDelegate) {
      return ((JavaElementDelegate) adaptableObject).getAdapter(adapterType);
    }
    JavaElementDelegate result = null;
    if (JextestJavaElementDelegate.class.equals(adapterType)) {
      // make sure injection happens
      result = jextestJavaElementDelegateProvider.get();
    }
    if (result != null) {
      try {
        if (adaptableObject instanceof IFileEditorInput) {
          result.initializeWith((IFileEditorInput) adaptableObject);
          return result;
        }
        if (adaptableObject instanceof IEditorPart) {
          result.initializeWith((IEditorPart) adaptableObject);
          return result;
        }
        if (adaptableObject instanceof IResource) {
          result.initializeWith((IResource) adaptableObject);
          return result;
        }
      } catch (NullPointerException e) {
        // problem with @Inject in superclass
      }
View Full Code Here


    }
  }
 
  @Override
  public void launch(IEditorPart editor, String mode) {
    JavaElementDelegate javaElementDelegate = (JavaElementDelegate) editor.getAdapter(JextestJavaElementDelegate.class);
    if (javaElementDelegate != null) {
      launch(new StructuredSelection(javaElementDelegate), mode);
    } else {
      super.launch(editor, mode);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.xbase.ui.launching.JavaElementDelegate

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.