本文整理汇总了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;
}