Java Code Examples for org.openide.util.lookup.AbstractLookup#Content
The following examples show how to use
org.openide.util.lookup.AbstractLookup#Content .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActionsInfraHid.java From netbeans with Apache License 2.0 | 5 votes |
private static AbstractLookup.Content getContent() { InstanceContent c = new InstanceContent(); c.add(UT); c.add(ActionsInfraHid.class.getClassLoader()); c.add(new NbMutexEventProvider()); return c; }
Example 2
Source File: RecognizeInstanceFiles.java From netbeans with Apache License 2.0 | 5 votes |
private OverFiles(String path, List<FOItem> items, AbstractLookup lkp, AbstractLookup.Content cnt) { super(computeDelegates(path, items, lkp)); this.path = path; this.lkp = lkp; this.content = cnt; this.content.setPairs(order(items)); FileSystem fs = null; try { fs = FileUtil.getSystemConfigRoot().getFileSystem(); } catch (FileStateInvalidException ex) { Exceptions.printStackTrace(ex); } this.weakL = FileUtil.weakFileChangeListener(this, fs); fs.addFileChangeListener(weakL); }
Example 3
Source File: InstanceDataObjectTest.java From netbeans with Apache License 2.0 | 4 votes |
public Lookup getEnvironment(DataObject obj) { failure = true; return new AbstractLookup (new AbstractLookup.Content ()); }
Example 4
Source File: DefaultTopComponentLookup.java From netbeans with Apache License 2.0 | 4 votes |
/** Extracts activated nodes from a top component and * returns their lookups. */ public void updateLookups(Node[] arr) { if (arr == null) { AbstractLookup.Content c = new AbstractLookup.Content(); AbstractLookup l = new AbstractLookup(c); c.addPair(new NoNodesPair()); setLookups(new Lookup[] { l, actionMap }); return; } Lookup[] lookups = new Lookup[arr.length]; Map<Lookup,Lookup.Result> copy; synchronized (this) { if (attachedTo == null) { copy = Collections.emptyMap(); } else { copy = new HashMap<Lookup,Lookup.Result>(attachedTo); } } for (int i = 0; i < arr.length; i++) { lookups[i] = arr[i].getLookup(); if (copy != null) { // node arr[i] remains there, so do not remove it copy.remove(arr[i]); } } for (Iterator<Lookup.Result> it = copy.values().iterator(); it.hasNext();) { Lookup.Result res = it.next(); res.removeLookupListener(listener); } synchronized (this) { attachedTo = null; } setLookups(new Lookup[] { new NoNodeLookup(new ProxyLookup(lookups), arr), Lookups.fixed((Object[])arr), actionMap, }); }
Example 5
Source File: RecognizeInstanceFiles.java From netbeans with Apache License 2.0 | 4 votes |
public OverFiles(String path) { this(path, new ArrayList<FOItem>(), new AbstractLookup.Content()); }
Example 6
Source File: RecognizeInstanceFiles.java From netbeans with Apache License 2.0 | 4 votes |
private OverFiles(String path, List<FOItem> items, AbstractLookup.Content cnt) { this(path, items, new AbstractLookup(cnt), cnt); }
Example 7
Source File: CompatFileExtrasLkp.java From netbeans with Apache License 2.0 | 4 votes |
public CompatFileExtrasLkp(AbstractLookup.Content content) { super(content); this.ic = (InstanceContent)content; }
Example 8
Source File: NavigatorTCTest.java From netbeans with Apache License 2.0 | 4 votes |
public GlobalLookup4TestImpl (AbstractLookup.Content content) { super(content); }
Example 9
Source File: NavigatorPanelWithToolbarTest.java From netbeans with Apache License 2.0 | 4 votes |
public GlobalLookup4TestImpl (AbstractLookup.Content content) { super(content); }
Example 10
Source File: NavigatorHandlerTest.java From netbeans with Apache License 2.0 | 4 votes |
public GlobalLookup4TestImpl (AbstractLookup.Content content) { super(content); }