2024-10-14 12:14:01 +03:00
|
|
|
package _VisualDVM.Passes.All;
|
2024-10-14 15:19:13 +03:00
|
|
|
import Common.Passes.Pass;
|
2024-10-09 22:01:19 +03:00
|
|
|
import _VisualDVM.Current;
|
2024-10-13 22:08:13 +03:00
|
|
|
import _VisualDVM.Global;
|
2024-10-09 22:21:57 +03:00
|
|
|
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
|
|
|
|
import _VisualDVM.ProjectData.Files.FileState;
|
2024-10-14 15:19:13 +03:00
|
|
|
import _VisualDVM.Visual.UI;
|
2024-10-09 23:37:58 +03:00
|
|
|
public class ExcludeFile extends Pass<DBProjectFile> {
|
2023-09-17 22:13:42 +03:00
|
|
|
@Override
|
|
|
|
|
public String getIconPath() {
|
|
|
|
|
return "/icons/Exclude.png";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) {
|
|
|
|
|
if (args.length > 0) {
|
|
|
|
|
target = (DBProjectFile) args[0];
|
|
|
|
|
return !target.state.equals(FileState.Excluded);
|
|
|
|
|
}
|
2024-10-13 22:08:13 +03:00
|
|
|
return Global.mainModule.Check(Log, Current.SelectedFile)
|
|
|
|
|
&& !(target = Global.mainModule.getSelectedFile()).state.equals(FileState.Excluded);
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void body() throws Exception {
|
|
|
|
|
target.Exclude();
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void showDone() throws Exception {
|
2024-10-15 02:32:52 +03:00
|
|
|
Global.mainModule.getUI().getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
}
|