本文整理匯總了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;
}
示例2: getLookup
/**
* Lookup associated with this browser pane.
*/
public Lookup getLookup() {
if ( impl == null ){
return Lookup.EMPTY;
}
return impl.getLookup();
}
示例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();
}
示例4: getBrowserLookup
Lookup getBrowserLookup() {
if (browserComponent != null) {
return browserComponent.getBrowserImpl().getLookup();
} else {
return Lookup.EMPTY;
}
}
示例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());
}
}
示例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());
}
示例7: getLookup
@Override
public Lookup getLookup() {
return Lookup.EMPTY;
}
示例8: getLookup
public Lookup getLookup() {
return Lookup.EMPTY; // PENDING
}
示例9: getLookup
public @Override Lookup getLookup() {
return Lookup.EMPTY;
}
示例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;
}
示例11: setUp
@Override
protected void setUp () {
support = new CES (this, Lookup.EMPTY);
RUNNING = this;
}
示例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();
}
示例13: getLookup
public Lookup getLookup() {
return Lookup.EMPTY;
}
示例14: testProxyLookupTemplateCachingOnSizeTwoArray
public void testProxyLookupTemplateCachingOnSizeTwoArray() {
Lookup lookups[] = new Lookup[2];
lookups[1] = Lookup.EMPTY;
doProxyLookupTemplateCaching(lookups, false);
}
示例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;
}