org.openide.actions.FindAction Java Examples

The following examples show how to use org.openide.actions.FindAction. 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: MultiModuleNodeFactory.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@NonNull
@Override
public Action[] getActions(final boolean context) {
    if (context) {
        return super.getActions(context);
    } else {
        if (actions == null) {
            actions = new Action[] {
                CommonProjectActions.newFileAction(),
                null,
                SystemAction.get(FindAction.class),
                null,
                SystemAction.get(PasteAction.class ),
                null,
                SystemAction.get(FileSystemAction.class ),
                null,
                SystemAction.get(ToolsAction.class )
            };
        }
        return actions;
    }
}
 
Example #2
Source File: DocBaseNodeFactory.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    if (actions == null) {
        actions = new Action[9];
        actions[0] = CommonProjectActions.newFileAction();
        actions[1] = null;
        actions[2] = SystemAction.get(FindAction.class);
        actions[3] = null;
        actions[4] = SystemAction.get(PasteAction.class);
        actions[5] = null;
        actions[6] = SystemAction.get(FileSystemAction.class);
        actions[7] = null;
        actions[8] = ProjectUISupport.createPreselectPropertiesAction(project, "Sources", null); //NOI18N
    }
    return actions;
}
 
Example #3
Source File: OutputTab.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private void loadAndInitActions() {
    RP.post(new Runnable() {
        @Override
        public void run() {
            createActions();
            EventQueue.invokeLater(new Runnable() {
                @Override
                public void run() {
                    installKBActions();
                    getActionMap().put("jumpPrev", //NOI18N
                            action(PREV_ERROR));
                    getActionMap().put("jumpNext", //NOI18N
                            action(NEXT_ERROR));
                    getActionMap().put(FindAction.class.getName(),
                            action(FIND));
                    getActionMap().put(
                            javax.swing.text.DefaultEditorKit.copyAction,
                            action(COPY));
                    actionsLoaded = true;
                    updateActions();
                    setInputVisible(isInputVisible()); // update action
                }
            });
        }
    });
}
 
Example #4
Source File: ClientSideProjectLogicalView.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    List<Action> actions = new ArrayList<Action>();
    actions.add(CommonProjectActions.newFileAction());
    actions.add(null);
    actions.add(SystemAction.get(FindAction.class));
    actions.add(null);
    actions.add(SystemAction.get(FileSystemAction.class));
    actions.add(null);
    actions.add(SystemAction.get(PasteAction.class));
    actions.add(null);
    actions.add(SystemAction.get(ToolsAction.class));
    actions.add(null);
    actions.add(CommonProjectActions.customizeProjectAction());
    return actions.toArray(new Action[actions.size()]);
}
 
Example #5
Source File: MVCNode.java    From cakephp3-netbeans with Apache License 2.0 5 votes vote down vote up
@Override
@NbBundle.Messages({
    "LBL_DownloadCommand=Download...",
    "LBL_UploadCommand=Upload...",
    "LBL_SyncCommand=Synchronize..."
})
public Action[] getActions(boolean context) {
    List<Action> actions = new ArrayList<>();
    actions.add(CommonProjectActions.newFileAction());
    actions.add(null);
    actions.add(FileSensitiveActions.fileCommandAction("dowonload", Bundle.LBL_DownloadCommand(), null));
    actions.add(FileSensitiveActions.fileCommandAction("upload", Bundle.LBL_UploadCommand(), null));
    actions.add(FileSensitiveActions.fileCommandAction("synchronize", Bundle.LBL_SyncCommand(), null));
    actions.add(null);
    actions.add(SystemAction.get(FileSystemAction.class));
    actions.add(null);
    actions.add(SystemAction.get(FindAction.class));
    actions.add(null);
    actions.add(SystemAction.get(PasteAction.class));
    actions.add(null);
    actions.add(SystemAction.get(ToolsAction.class));
    actions.add(null);
    // customizer - open sources for source node, phpunit for test node
    Action customizeAction;
    customizeAction = CommonProjectActions.customizeProjectAction();
    actions.add(customizeAction);
    return actions.toArray(new Action[actions.size()]);
}
 
Example #6
Source File: PackageView.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * Creates actions for package root.
 * @return the array of {@link Action}s
 */
@NonNull
static Action[] createRootNodeActions() {
    return new Action[] {
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get( FindAction.class ),
        null,
        SystemAction.get( PasteAction.class ),
        null,
        SystemAction.get( FileSystemAction.class ),
        null,
        SystemAction.get( ToolsAction.class ),
    };
}
 
Example #7
Source File: MMDGraphEditor.java    From netbeans-mmd-plugin with Apache License 2.0 5 votes vote down vote up
private void registerCustomCCPActions(@Nonnull final JComponent component) {
  final ActionMap actionMap = component.getActionMap();
  actionMap.put(DefaultEditorKit.cutAction, this.actionCut);
  actionMap.put(DefaultEditorKit.copyAction, this.actionCopy);
  actionMap.put(DefaultEditorKit.pasteAction, this.actionPaste);
  actionMap.put(FindAction.class.getName(), findAction);
}
 
Example #8
Source File: PropertiesOpen.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * Sets up action Find that it is activated/deactivated appropriately
 * and so that it does what it should do.
 */
private void setupActions() {
    JTable bundleTable = ((BundleEditPanel) getComponent(0)).getTable();
    FindAction findAction = SystemAction.get(FindAction.class);
    Action action = FindPerformer.getFindPerformer(bundleTable);
    getActionMap().put(findAction.getActionMapKey(), action);
}
 
Example #9
Source File: GrailsLogicalViewProvider.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private Action[] getAdditionalActions() {
    List<Action> actions = new ArrayList<Action>();
    actions.add(CommonProjectActions.newFileAction());
    actions.add(null);
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_BUILD, "LBL_BuildAction_Name"));
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_COMPILE, "LBL_Compile_Name"));
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_CLEAN, "LBL_CleanAction_Name"));
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_UPGRADE, "LBL_Upgrade_Name"));
    actions.add(null);
    actions.add(SystemAction.get(GrailsCommandAction.class));
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_GRAILS_SHELL, "LBL_ShellAction_Name"));
    actions.add(new ManagePluginsAction(project));
    actions.add(null);
    actions.add(new ResolvePluginsAction(project));
    actions.add(null);
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_RUN, "LBL_RunAction_Name"));
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_DEBUG, "LBL_DebugAction_Name"));
    actions.add(getCommandAction(GrailsActionProvider.COMMAND_TEST, "LBL_TestAction_Name"));
    actions.add(null);
    actions.add(CommonProjectActions.setAsMainProjectAction());
    actions.add(CommonProjectActions.closeProjectAction());
    actions.add(null);
    actions.add(SystemAction.get(FindAction.class));
    actions.add(null);
    actions.add(CommonProjectActions.deleteProjectAction());
    actions.add(null);

    // honor 57874 contact
    actions.addAll(Utilities.actionsForPath("Projects/Actions")); //NOI18N

    actions.add(null);
    actions.add(CommonProjectActions.customizeProjectAction());

    return actions.toArray(new Action[actions.size()]);
}
 
Example #10
Source File: SrcNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    List<Action> actions = new ArrayList<>();
    actions.add(CommonProjectActions.newFileAction());
    actions.add(null);
    if (!isTest) {
        actions.add(FileSensitiveActions.fileCommandAction(DownloadCommand.ID, DownloadCommand.DISPLAY_NAME, null));
        actions.add(FileSensitiveActions.fileCommandAction(UploadCommand.ID, UploadCommand.DISPLAY_NAME, null));
        actions.add(FileSensitiveActions.fileCommandAction(SyncCommand.ID, SyncCommand.DISPLAY_NAME, null));
        actions.add(null);
    } else {
        // #252010
        if (project.getTestRoots().getRoots().length > 1) {
            actions.add(ProjectSensitiveActions.projectCommandAction(RunTestsCommand.ID, RunTestsCommand.DISPLAY_NAME, null));
            actions.add(null);
        }
    }
    actions.add(SystemAction.get(FileSystemAction.class));
    actions.add(null);
    actions.add(SystemAction.get(FindAction.class));
    actions.add(null);
    actions.add(SystemAction.get(PasteAction.class));
    actions.add(null);
    actions.add(SystemAction.get(ToolsAction.class));
    actions.add(null);
    // customizer - open sources for source node, testing for test node
    Action customizeAction = null;
    if (isTest) {
        customizeAction = new PhpLogicalViewProvider.CustomizeProjectAction(project, CompositePanelProviderImpl.TESTING);
    } else {
        customizeAction = CommonProjectActions.customizeProjectAction();
    }
    if (customizeAction != null) {
        actions.add(customizeAction);
    }
    return actions.toArray(new Action[actions.size()]);
}
 
Example #11
Source File: ServerResourceNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public Action[] getActions( boolean context ) {
    return new Action[] {
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get(FileSystemAction.class),
        null,
        SystemAction.get(FindAction.class),
        null,
        SystemAction.get(PasteAction.class),
    };
}
 
Example #12
Source File: JaxWsRootNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get(FindAction.class),
        null,
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(PropertiesAction.class)
    };
}
 
Example #13
Source File: JaxWsClientRootNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get(FindAction.class),
        null,
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(PropertiesAction.class)
    };
}
 
Example #14
Source File: ArchiveViews.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
        public Action[] getActions( boolean context ) {
            return new Action[] {
//                CommonProjectActions.newFileAction(),
//                null,
//                SystemAction.get(FileSystemRefreshAction.class),
//                null,
                SystemAction.get(FindAction.class),
//                null,
//                SystemAction.get(PasteAction.class),
//                null,
//                SystemAction.get(ToolsAction.class),
            };
        }
 
Example #15
Source File: RestServicesNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[] {
                CommonProjectActions.newFileAction(),
                SystemAction.get(TestRestServicesAction.class),
                null,
                SystemAction.get(FindAction.class),
                null,
                SystemAction.get(PasteAction.class),
                null,
                SystemAction.get(PropertiesAction.class)
            };
}
 
Example #16
Source File: ProjectWebServiceNodeFactory.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
                CommonProjectActions.newFileAction(),
                null,
                SystemAction.get(FindAction.class),
                null,
                SystemAction.get(PasteAction.class),
                null,
                SystemAction.get(PropertiesAction.class)
            };
}
 
Example #17
Source File: JaxWsRootNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get(FindAction.class),
        null,
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(PropertiesAction.class)
    };
}
 
Example #18
Source File: JaxWsClientRootNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public Action[] getActions(boolean context) {
    return new Action[]{
        CommonProjectActions.newFileAction(),
        null,
        SystemAction.get(FindAction.class),
        null,
        SystemAction.get(PasteAction.class),
        null,
        SystemAction.get(PropertiesAction.class)
    };
}
 
Example #19
Source File: ActionFilterNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static boolean isFindAction(final Action action) {
    if (action == null) {
        return false;
    }
    if (action instanceof FindAction) {
        return true;
    }
    if ("org.openide.actions.FindAction".equals(action.getValue("key"))) { //NOI18N
        return true;
    }
    return false;
}
 
Example #20
Source File: LibrariesNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public Action[] getActions(boolean context) {
    return new Action[]{
                new EditDependencyAction(dep.getModuleEntry().getCodeNameBase(), project),
                SystemAction.get(FindAction.class),
                new ShowJavadocAction(dep, project),
                SystemAction.get(RemoveAction.class),
            };
}
 
Example #21
Source File: UnitTestLibrariesNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public @Override Action[] getActions(boolean context) {
    if (actions == null) {
        Set<Action> result = new LinkedHashSet<Action>();
        result.add(new EditTestDependencyAction(dep, testType, project));
        Action[] superActions = super.getActions(false);
        for (int i = 0; i < superActions.length; i++) {
            if (superActions[i] instanceof FindAction) {
                result.add(superActions[i]);
            }
        }
        result.add(LibrariesChildren.REMOVE_DEPENDENCY_ACTION);
        actions = result.toArray(new Action[result.size()]);
    }
    return actions;
}
 
Example #22
Source File: MimeLookupInheritanceTest.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void testAntXmlPopup(){
    MimeLookup lookup = MimeLookup.getMimeLookup("text/xml"); //NOI18N
    Class layerObjects[] = {CutAction.class, CopyAction.class, PasteAction.class, ReplaceAction.class};
    testPopupItems(lookup, layerObjects);
    lookup = MimeLookup.getMimeLookup("text/x-ant+xml"); //NOI18N
    Class layerObjects2[] = {CutAction.class, CopyAction.class, PasteAction.class, ReplaceAction.class, FindAction.class};
    testPopupItems(lookup, layerObjects2);
}
 
Example #23
Source File: MimeLookupInheritanceTest.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * Issue #61245: Delegate application/*+xml -> text/xml
 */
public void test61245(){
    MimeLookup lookup = MimeLookup.getMimeLookup("application/xml");
    checkLookupObject(lookup, FindAction.class, true);
    lookup = MimeLookup.getMimeLookup("application/xhtml+xml");
    checkLookupObject(lookup, CutAction.class, true);
    checkLookupObject(lookup, FindAction.class, false);
    checkLookupObject(lookup, ReplaceAction.class, true);
}
 
Example #24
Source File: Depr_MimeLookupInheritanceTest.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void testAntXmlPopup(){
    MimeLookup lookup = MimeLookup.getMimeLookup("text/xml"); //NOI18N
    Class layerObjects[] = {CutAction.class, CopyAction.class, PasteAction.class, ReplaceAction.class};
    testPopupItems(lookup, layerObjects);
    lookup = MimeLookup.getMimeLookup("text/x-ant+xml"); //NOI18N
    Class layerObjects2[] = {CutAction.class, CopyAction.class, PasteAction.class, ReplaceAction.class, FindAction.class};
    testPopupItems(lookup, layerObjects2);
}
 
Example #25
Source File: Depr_MimeLookupInheritanceTest.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * Issue #61245: Delegate application/*+xml -> text/xml
 */
public void test61245(){
    MimeLookup lookup = MimeLookup.getMimeLookup("application/xml");
    checkLookupObject(lookup, FindAction.class, true);
    lookup = MimeLookup.getMimeLookup("application/xhtml+xml");
    checkLookupObject(lookup, CutAction.class, true);
    checkLookupObject(lookup, FindAction.class, false);
    checkLookupObject(lookup, ReplaceAction.class, true);
}
 
Example #26
Source File: ActionFilterNode.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private Action[] initActions () {
    if (actionCache == null) {
        List<Action> result = new ArrayList<Action>(2);
        if (mode == Mode.FILE) {
            for (Action superAction : super.getActions(false)) {
                if (isOpenAction(superAction)) {
                    result.add(superAction);
                }
            }
            result.add (SystemAction.get(ShowJavadocAction.class));
        }
        else if (mode.isFolder()) {
            result.add (SystemAction.get(ShowJavadocAction.class));
            Action[] superActions = super.getActions(false);
            for (int i=0; i<superActions.length; i++) {
                if (superActions[i] instanceof FindAction) {
                    result.add (superActions[i]);
                }
            }                
            if (mode.isRoot()) {
                result.add (SystemAction.get(RemoveClassPathRootAction.class));
            }
            if (mode == Mode.EDITABLE_ROOT) {
                result.add (SystemAction.get(EditRootAction.class));
            }
        }            
        actionCache = result.toArray(new Action[result.size()]);
    }
    return actionCache;
}
 
Example #27
Source File: Depr_MimeLookupPopupItemsChangeTest.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/** Testing Base level popup items lookup and sorting */
@RandomlyFails // NB-Core-Build #3718
public void testDynamicChangeInPopupFolders() throws IOException{
    final int resultChangedCount[] = new int[1];
    resultChangedCount[0] = 0;

    MimeLookup lookup = MimeLookup.getMimeLookup("text/x-java").childLookup("text/xml"). //NOI18N
            childLookup("text/html"); //NOI18N
    Lookup.Result result = lookup.lookup(new Template(PopupActions.class));
    result.allInstances(); // remove this line if issue #60010 is fixed
    LookupListener listener = new LookupListener(){
        public void resultChanged(LookupEvent ev){
            resultChangedCount[0]++;
        }
    };
    result.addLookupListener(listener);
    PopupActions actions = (PopupActions) lookup.lookup(PopupActions.class);
    assertTrue("PopupActions should be found", actions != null);
    List popupActions = actions.getPopupActions();
    int size = popupActions.size();
    assertTrue("Number of PopupActions found:"+size+" and should be:"+fsstruct.length, size == fsstruct.length);

    //delete RenameAction
    TestUtilities.deleteFile(getWorkDir(),
            "Editors/text/html/Popup/org-openide-actions-RenameAction.instance");
    checkPopupItemPresence(lookup, RenameAction.class, false);

    // check firing the change
    assertTrue(("resultChangedCount is:"+resultChangedCount[0]+" instead of 1"),resultChangedCount[0] == 1);
    resultChangedCount[0] = 0;
    
    //delete base CutAction
    TestUtilities.deleteFile(getWorkDir(),
            "Editors/Popup/org-openide-actions-CutAction.instance");

    checkPopupItemPresence(lookup, CutAction.class, false);

    // check firing the change
    assertTrue(("resultChangedCount is:"+resultChangedCount[0]+" instead of 1"),resultChangedCount[0] == 1);
    resultChangedCount[0] = 0;
    
    //simulate module installation, new action will be added
    TestUtilities.createFile(getWorkDir(), 
            "Editors/Popup/org-openide-actions-FindAction.instance"); //NOI18N      

    checkPopupItemPresence(lookup, FindAction.class, true);

    // check firing the change
    assertTrue(("resultChangedCount is:"+resultChangedCount[0]+" instead of 1"),resultChangedCount[0] == 1);
    resultChangedCount[0] = 0;
    
    //simulate module installation, new action will be added
    TestUtilities.createFile(getWorkDir(), 
            "Editors/text/x-java/text/xml/text/html/Popup/org-openide-actions-ReplaceAction.instance"); //NOI18N      

    checkPopupItemPresence(lookup, ReplaceAction.class, true);
    
    //ReplaceAction was created in the uppermost folder
    // let's try it is missing in the lower lookup
    lookup = MimeLookup.getMimeLookup("text/x-java").childLookup("text/xml"); //NOI18N
    checkPopupItemPresence(lookup, ReplaceAction.class, false);        
    checkPopupItemPresence(lookup, FindAction.class, true);
    
    // lookup for ReplaceAction in the folder that doesn't exist
    lookup = MimeLookup.getMimeLookup("text/html"); //NOI18N
    checkPopupItemPresence(lookup, ReplaceAction.class, false); 
    // create folder with ReplaceAction
    TestUtilities.createFile(getWorkDir(), 
            "Editors/text/html/Popup/org-openide-actions-ReplaceAction.instance"); //NOI18N

    checkPopupItemPresence(lookup, ReplaceAction.class, true);
    
}
 
Example #28
Source File: ConfFilesNodeFactory.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public javax.swing.Action[] getActions(boolean context) {
    return new javax.swing.Action[]{SystemAction.get(FindAction.class)};
}
 
Example #29
Source File: J2eeProjectView.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public Action[] getActions( boolean context ) {
    return new Action[] {
        SystemAction.get(FindAction.class),
    };
}
 
Example #30
Source File: MimeLookupPopupItemsChangeTest.java    From netbeans with Apache License 2.0 4 votes vote down vote up
/** Testing Base level popup items lookup and sorting */
@RandomlyFails // NB-Core-Build #4599: resultChangedCount is:2 instead of 1
public void testDynamicChangeInPopupFolders() throws Exception {
    final int resultChangedCount[] = new int[1];
    resultChangedCount[0] = 0;

    MimePath mp = MimePath.parse("text/x-java/text/xml/text/html");
    Lookup lookup = getLookup(mp);
    Lookup.Result result = lookup.lookup(new Template(PopupActions.class));
    result.allInstances(); // remove this line if issue #60010 is fixed
    LookupListener listener = new LookupListener(){
        public void resultChanged(LookupEvent ev){
            resultChangedCount[0]++;
        }
    };
    result.addLookupListener(listener);
    PopupActions actions = (PopupActions) lookup.lookup(PopupActions.class);
    assertTrue("PopupActions should be found", actions != null);
    List popupActions = actions.getPopupActions();
    int size = popupActions.size();
    assertTrue("Number of PopupActions found:"+size+" and should be:"+fsstruct.length, size == fsstruct.length);

    //delete RenameAction
    TestUtilities.deleteFile(getWorkDir(),
            "Editors/text/html/Popup/org-openide-actions-RenameAction.instance");
    checkPopupItemPresence(lookup, RenameAction.class, false);

    // check firing the change
    assertTrue(("resultChangedCount is:"+resultChangedCount[0]+" instead of 1"),resultChangedCount[0] == 1);
    resultChangedCount[0] = 0;
    
    //delete base CutAction
    TestUtilities.deleteFile(getWorkDir(),
            "Editors/Popup/org-openide-actions-CutAction.instance");

    checkPopupItemPresence(lookup, CutAction.class, false);

    // check firing the change
    assertTrue(("resultChangedCount is:"+resultChangedCount[0]+" instead of 1"),resultChangedCount[0] == 1);
    resultChangedCount[0] = 0;
    
    //simulate module installation, new action will be added
    TestUtilities.createFile(getWorkDir(), 
            "Editors/Popup/org-openide-actions-FindAction.instance"); //NOI18N      

    checkPopupItemPresence(lookup, FindAction.class, true);

    // check firing the change
    assertTrue(("resultChangedCount is:"+resultChangedCount[0]+" instead of 1"),resultChangedCount[0] == 1);
    resultChangedCount[0] = 0;
    
    //simulate module installation, new action will be added
    TestUtilities.createFile(getWorkDir(), 
            "Editors/text/x-java/text/xml/text/html/Popup/org-openide-actions-ReplaceAction.instance"); //NOI18N      

    checkPopupItemPresence(lookup, ReplaceAction.class, true);
    
    //ReplaceAction was created in the uppermost folder
    // let's try it is missing in the lower lookup
    mp = MimePath.get(MimePath.get("text/x-java"), "text/xml");
    lookup = getLookup(mp);
    checkPopupItemPresence(lookup, ReplaceAction.class, false);        
    checkPopupItemPresence(lookup, FindAction.class, true);
    
    // lookup for ReplaceAction in the folder that doesn't exist
    lookup = MimeLookup.getLookup("text/html"); //NOI18N
    checkPopupItemPresence(lookup, ReplaceAction.class, false); 
    // create folder with ReplaceAction
    TestUtilities.createFile(getWorkDir(), 
            "Editors/text/html/Popup/org-openide-actions-ReplaceAction.instance"); //NOI18N      

    checkPopupItemPresence(lookup, ReplaceAction.class, true);
    
}