Java Code Examples for org.openide.util.LookupEvent#getSource()
The following examples show how to use
org.openide.util.LookupEvent#getSource() .
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: MultiViewActionMapTest.java From netbeans with Apache License 2.0 | 5 votes |
public void resultChanged (LookupEvent ev) { Lookup.Result res = (Lookup.Result)ev.getSource(); assertEquals(1, res.allInstances().size()); ActionMap map = (ActionMap)res.allInstances().iterator().next(); if (lastMap != null) { // because of CallbackSystemAction.GlobalManager assertNotSame(map, lastMap); } lastMap = map; Action act = map.get(key); assertEquals(action, act); count++; }
Example 2
Source File: ContextManager.java From netbeans with Apache License 2.0 | 5 votes |
@Override public void resultChanged(LookupEvent ev) { if (ev.getSource() == nodes) { Collection<? extends Item<Provider>> arr = nodes.allItems(); if (arr.size() == 1 && arr.iterator().next().getInstance() == null) { return; } initValues(); return; } final LookupEvent mev = new LookupEvent(this); for (LookupListener ll : listeners) { ll.resultChanged(mev); } }
Example 3
Source File: CssStylesTCController.java From netbeans with Apache License 2.0 | 5 votes |
@Override public final void resultChanged(LookupEvent ev) { PageInspector pageInspector = PageInspector.getDefault(); if (pageInspector != null) { Lookup.Result lookupResult = (Lookup.Result) ev.getSource(); lookupResult.removeLookupListener(this); pageInspector.addPropertyChangeListener(this); } }
Example 4
Source File: ViewDB.java From opensim-gui with Apache License 2.0 | 5 votes |
@Override public void resultChanged(LookupEvent ev) { Lookup.Result r = (Lookup.Result) ev.getSource(); Collection c = r.allInstances(); if (!c.isEmpty()) { Object lup = c.iterator().next(); int x=0; } }
Example 5
Source File: ServerInstanceLookupTest.java From netbeans with Apache License 2.0 | 4 votes |
public void resultChanged(LookupEvent ev) { count++; Result<DeploymentManager> result = (Result<DeploymentManager>) ev.getSource(); assertEquals(registered, result); }
Example 6
Source File: CloseOtherProductsAction.java From snap-desktop with GNU General Public License v3.0 | 4 votes |
@Override public void resultChanged(LookupEvent ev) { setEnableState(); Lookup.Result result = (Lookup.Result) ev.getSource(); selectedProductList = result.allInstances(); }