Java 类org.eclipse.xtext.ui.editor.IURIEditorOpener 实例源码

项目:statecharts    文件:SCTXtextIntegrationModule.java   
@Override
public void configure(Binder binder) {
    binder.bind(IResourceValidator.class).to(SCTResourceValidatorImpl.class);
    binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("sct");
    binder.bind(IEncodingProvider.class).to(IEncodingProvider.Runtime.class);
    binder.bind(IQualifiedNameProvider.class).to(StextNameProvider.class);
    binder.bind(org.eclipse.jface.viewers.ILabelProvider.class)
            .annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class)
            .to(DefaultDescriptionLabelProvider.class);
    binder.bind(IDefaultResourceDescriptionStrategy.class).to(SCTResourceDescriptionStrategy.class);

    binder.bind(MarkerCreator.class).to(SCTMarkerCreator.class);
    binder.bind(MarkerTypeProvider.class).to(SCTMarkerTypeProvider.class);
    binder.bind(IDiagnosticConverter.class).to(SCTDiagnosticConverterImpl.class);
    binder.bind(IURIEditorOpener.class).annotatedWith(LanguageSpecific.class).to(SCTFileEditorOpener.class);

    binder.bind(IMarkerContributor.class).to(TaskMarkerContributor.class);
    binder.bind(ITaskFinder.class).to(DomainSpecificTaskFinder.class);
    binder.bind(TaskMarkerCreator.class).to(SCTTaskMarkerCreator.class);
    binder.bind(TaskMarkerTypeProvider.class).to(SCTTaskMarkerTypeProvider.class);
}
项目:smaccm    文件:GoToElementDeclarationCommand.java   
@Override
public boolean isAvailable(final CommandContext ctx) {
    // Check if the business object is a state element referencing a handled declarative object 
    if(!ctx.getSimulationEngineState().isElement(ctx.getBusinessObject())) {
        return false; 
    }

    final NamedElement namedElement = getHandledDeclarativeObject(ctx);
    return namedElement != null && 
            namedElement.eResource() instanceof XtextResource && 
            ((XtextResource)namedElement.eResource()).getResourceServiceProvider().get(IURIEditorOpener.class) != null;
}
项目:smaccm    文件:GoToElementDeclarationCommand.java   
@Override
public void activate(final CommandContext ctx) {
    final EObject decl = getHandledDeclarativeObject(ctx);
    final XtextResource res = (XtextResource)decl.eResource();
    final IURIEditorOpener editorOpener = res.getResourceServiceProvider().get(IURIEditorOpener.class);
    if(editorOpener != null) {
        editorOpener.open(EcoreUtil.getURI(decl), true);
    }           
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public void configureLanguageSpecificURIEditorOpener(Binder binder) {
    if (PlatformUI.isWorkbenchRunning()) {
        binder.bind(IURIEditorOpener.class).annotatedWith(LanguageSpecific.class).to(DerivedMemberAwareEditorOpener.class);
        binder.bind(IDerivedMemberAwareEditorOpener.class).to(DerivedMemberAwareEditorOpener.class);
    }
}
项目:lcdsl    文件:LcDslLaunchObject.java   
@Override
public void edit() {
    IURIEditorOpener opener = LcDslHelper.getInjector().getInstance(IURIEditorOpener.class);
    opener.open(EcoreUtil2.getPlatformResourceOrNormalizedURI(cfg), true);
}
项目:bts    文件:EmfUiModule.java   
public void configureLanguageSpecificURIEditorOpener(com.google.inject.Binder binder) {
    binder.bind(IURIEditorOpener.class).annotatedWith(LanguageSpecific.class).to(LanguageSpecificURIEditorOpener.class);
}
项目:bts    文件:DefaultResourceUIServiceProvider.java   
public IURIEditorOpener getURIEditorOpener() {
    return uriEditorOpener;
}
项目:bts    文件:DefaultUiModule.java   
public void configureLanguageSpecificURIEditorOpener(com.google.inject.Binder binder) {
    if (PlatformUI.isWorkbenchRunning())
        binder.bind(IURIEditorOpener.class).annotatedWith(LanguageSpecific.class)
                .to(LanguageSpecificURIEditorOpener.class);
}
项目:CooperateModelingEnvironment    文件:AbstractComponentUiModule.java   
public void configureLanguageSpecificURIEditorOpener(Binder binder) {
    if (PlatformUI.isWorkbenchRunning())
        binder.bind(IURIEditorOpener.class)
            .annotatedWith(LanguageSpecific.class)
            .to(CDOLanguageSpecificURIEditorOpener.class);
}
项目:CooperateModelingEnvironment    文件:AbstractClsUiModule.java   
public void configureLanguageSpecificURIEditorOpener(Binder binder) {
    if (PlatformUI.isWorkbenchRunning())
        binder.bind(IURIEditorOpener.class)
            .annotatedWith(LanguageSpecific.class)
            .to(CDOLanguageSpecificURIEditorOpener.class);
}
项目:CooperateModelingEnvironment    文件:AbstractUsecaseUiModule.java   
public void configureLanguageSpecificURIEditorOpener(Binder binder) {
    if (PlatformUI.isWorkbenchRunning())
        binder.bind(IURIEditorOpener.class)
            .annotatedWith(LanguageSpecific.class)
            .to(CDOLanguageSpecificURIEditorOpener.class);
}
项目:n4js    文件:ChangeManager.java   
private IURIEditorOpener getEditorOpener() {
    return org.eclipse.ui.PlatformUI.isWorkbenchRunning() ? tempInjector.getInstance(IURIEditorOpener.class) : null;

}
项目:dsl-devkit    文件:CheckUiModule.java   
/**
 * Binds a editor opener for platform plugin URIs.
 * 
 * @param binder
 *          the binder
 */
@Override
public void configureLanguageSpecificURIEditorOpener(final com.google.inject.Binder binder) {
  binder.bind(IURIEditorOpener.class).annotatedWith(LanguageSpecific.class).to(PlatformPluginAwareEditorOpener.class);
}
项目:bts    文件:IResourceUIServiceProvider.java   
/**
 * The {@link IURIEditorOpener}�of the language
 */
IURIEditorOpener getURIEditorOpener();