Skip to content

Commit

Permalink
Disable the Create index menu option
Browse files Browse the repository at this point in the history
  • Loading branch information
picimako committed Nov 10, 2024
1 parent d114482 commit 7e7d3ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

## [0.4.1]
### Changed
- Temporarily disabled the Create index menu option.

## [0.4.0]
### Changed
- New supported IDE version range: 2024.2 - 2024.3.*.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.picimako.org.apache.lucene.luke.app.DirectoryHandler;
import com.picimako.org.apache.lucene.luke.app.IndexHandler;
import com.picimako.org.apache.lucene.luke.app.desktop.components.dialog.menubar.CheckIndexDialogFactory;
import com.picimako.org.apache.lucene.luke.app.desktop.components.dialog.menubar.CreateIndexDialogFactory;
//import com.picimako.org.apache.lucene.luke.app.desktop.components.dialog.menubar.CreateIndexDialogFactory;
import com.picimako.org.apache.lucene.luke.app.desktop.components.dialog.menubar.ExportTermsDialogFactory;
import com.picimako.org.apache.lucene.luke.app.desktop.components.dialog.menubar.OpenIndexDialogFactory;
import com.picimako.org.apache.lucene.luke.app.desktop.components.dialog.menubar.OptimizeIndexDialogFactory;
Expand Down Expand Up @@ -58,7 +58,7 @@ public final class MenuBarProvider {

private final JMenuItem reopenIndexMItem = new JBMenuItem(MessageUtils.getLocalizedMessage("menu.item.reopen_index"));

private final JMenuItem createIndexMItem = new JBMenuItem(MessageUtils.getLocalizedMessage("menu.item.create_index"));
// private final JMenuItem createIndexMItem = new JBMenuItem(MessageUtils.getLocalizedMessage("menu.item.create_index"));

private final JMenuItem closeIndexMItem = new JBMenuItem(MessageUtils.getLocalizedMessage("menu.item.close_index"));

Expand Down Expand Up @@ -104,8 +104,8 @@ private JMenu createFileMenu() {
reopenIndexMItem.addActionListener(listeners::reopenIndex);
fileMenu.add(reopenIndexMItem);

createIndexMItem.addActionListener(listeners::showCreateIndexDialog);
fileMenu.add(createIndexMItem);
// createIndexMItem.addActionListener(listeners::showCreateIndexDialog);
// fileMenu.add(createIndexMItem);

closeIndexMItem.setEnabled(false);
closeIndexMItem.addActionListener(listeners::closeIndex);
Expand Down Expand Up @@ -139,13 +139,13 @@ void showOpenIndexDialog(ActionEvent e) {
}
}

void showCreateIndexDialog(ActionEvent e) {
try {
new CreateIndexDialogFactory(project).show();
} catch (IOException ex) {
throw new LukeException(ex);
}
}
// void showCreateIndexDialog(ActionEvent e) {
// try {
// new CreateIndexDialogFactory(project).show();
// } catch (IOException ex) {
// throw new LukeException(ex);
// }
// }

void reopenIndex(ActionEvent e) {
indexHandler.reOpen();
Expand Down

0 comments on commit 7e7d3ec

Please sign in to comment.