當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。