当前位置: 首页>>代码示例>>Java>>正文


Java Lookup.EMPTY属性代码示例

本文整理汇总了Java中org.openide.util.Lookup.EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java Lookup.EMPTY属性的具体用法?Java Lookup.EMPTY怎么用?Java Lookup.EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.openide.util.Lookup的用法示例。


在下文中一共展示了Lookup.EMPTY属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isProject

@Override
@CheckForNull
public Result isProject(@NonNull final FileObject projectDirectory) {
    final FileObject marker = projectDirectory.getFileObject(PATTERN);
    if (marker != null && marker.isData()) {
        return new Result(
                Lookup.EMPTY,
                new Callable<Project>() {
                    @Override
                    public Project call() throws Exception {
                        return new OpenedProject(projectDirectory);
                    }
                },
                "Automatic Project",    //NOI18N
                null);
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:SourcesHelperIssue258004Test.java

示例2: getLookup

/**
 * Lookup associated with this browser pane.
 */
public Lookup getLookup() {
    if ( impl == null ){
        return Lookup.EMPTY;
    }
    return impl.getLookup();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:WebBrowserPane.java

示例3: getEnvironment

public Lookup getEnvironment(DataObject dobj) {
    boolean recognize = false;
    if (dobj instanceof InstanceDataObject) {
        recognize = true;
    } else if (dobj instanceof XMLDataObject) {
        recognize = Boolean.TRUE.equals(dobj.getPrimaryFile().getParent().getAttribute("recognizeXML"));
    }

    if (!recognize) {
        return Lookup.EMPTY;
    }
    InstanceProvider icp = new InstanceProvider(dobj, providerFO);
    return icp.getLookup();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Env.java

示例4: getBrowserLookup

Lookup getBrowserLookup() {
    if (browserComponent != null) {
        return browserComponent.getBrowserImpl().getLookup();
    } else {
        return Lookup.EMPTY;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:HtmlBrowserComponent.java

示例5: testListener

@Test
public void testListener() {
    final AtomicReference<Boolean> refContainsTarget = new AtomicReference<Boolean>(null);
    final AccessibleProxyLookup proxy = new AccessibleProxyLookup(Lookup.EMPTY);
    final Lookup.Result<Serializable> lookupResult = proxy.lookupResult(Serializable.class);

    lookupResult.addLookupListener(new LookupListener() {

        @Override
        public void resultChanged(final LookupEvent le) {
            refContainsTarget.set(!lookupResult.allInstances().isEmpty());
        }
    });

    for (int i = 0; i < parameters.size(); i++) {
        final Params params = parameters.get(i);

        if (params.checkSize) {
            proxy.lookupAll(Serializable.class).size();
        }

        proxy.changeLookups(createLookup(params.addTargetType));

        final StringBuilder sb = new StringBuilder("LookupListener set the value to something unexpected.\n");

        for (int idx = 0; idx < parameters.size(); idx++) {
            sb.append('[').append(idx).append("] = ").append(parameters.get(idx)).append('\n');
        }

        sb.append("Failed at [").append(i).append("]");

        assertEquals(sb.toString(), params.expected, refContainsTarget.get());
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:ProxyLookupResultListenerTest.java

示例6: openIAT

@Override
public void openIAT(final HintMetadata hm) {
    Node[] n = TopComponent.getRegistry().getActivatedNodes();
    final Lookup context = n.length > 0 ? n[0].getLookup():Lookup.EMPTY;
    org.netbeans.modules.java.hints.spiimpl.refactoring.Utilities.invokeAfterScanFinished(new Runnable() {
        @Override
        public void run() {
            InspectAndRefactorUI.openRefactoringUI(new ProxyLookup(context, Lookups.singleton(hm)));
        }
    }, Bundle.CTL_ApplyPatternAction());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:InspectAndTransformOpenerImpl.java

示例7: getLookup

@Override
public Lookup getLookup() {
    return Lookup.EMPTY;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CssRenameRefactoringPlugin.java

示例8: getLookup

public Lookup getLookup() {
    return Lookup.EMPTY; // PENDING
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:LookTreeNode.java

示例9: getLookup

public @Override Lookup getLookup() {
    return Lookup.EMPTY;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:CPExtenderTest.java

示例10: CustomPopupActions

private CustomPopupActions(boolean onFile, boolean onPomFile, FileObject fo) {
    putValue(Action.NAME, onFile ? LBL_Custom_Run_File() : LBL_Custom_Run());
    this.onFile = onFile;
    this.onPom = onPomFile;
    this.lookup = fo != null ? Lookups.singleton(fo) : Lookup.EMPTY;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:ActionProviderImpl.java

示例11: setUp

@Override
protected void setUp () {
    support = new CES (this, Lookup.EMPTY);
    RUNNING = this;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:CloneableEditorDocumentGCTest.java

示例12: getSelectedCategory

/**
 * @return Lookup representing the category of currently selected item. 
 * The lookup is empty if no item is currently selected.
 */
public Lookup getSelectedCategory() {
    Category selCategory = model.getSelectedCategory();
    return null == selCategory ? Lookup.EMPTY : selCategory.getLookup();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:PaletteController.java

示例13: getLookup

public Lookup getLookup() {
    return Lookup.EMPTY;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:3,代码来源:ManagerTest.java

示例14: testProxyLookupTemplateCachingOnSizeTwoArray

public void testProxyLookupTemplateCachingOnSizeTwoArray() {
    Lookup lookups[] = new Lookup[2];
    lookups[1] = Lookup.EMPTY;
    doProxyLookupTemplateCaching(lookups, false);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ProxyLookupTest.java

示例15: getLookup

/**
 * Each option category can provide some lookup. Options Dialog master
 * lookup is composed from these individual lookups. Master lookup
 * can be obtained from {@link #getComponent} call. This lookup is designed
 * to support communication anong individual panels in one Options
 * Dialog.
 * 
 * There is no guarantee that this method will be called from AWT thread.
 * 
 * @return lookup provided by this Options Dialog panel
 */
public Lookup getLookup () {
    return Lookup.EMPTY;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:OptionsPanelController.java


注:本文中的org.openide.util.Lookup.EMPTY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。