no message
This commit is contained in:
30
src/_VisualDVM/Passes/All/IncludeFile.java
Normal file
30
src/_VisualDVM/Passes/All/IncludeFile.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.Files.FileState;
|
||||
import Common.Passes.Pass;
|
||||
public class IncludeFile extends Pass<DBProjectFile> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/icons/Include.png";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) {
|
||||
if (args.length > 0) {
|
||||
target = (DBProjectFile) args[0];
|
||||
return target.state.equals(FileState.Excluded);
|
||||
}
|
||||
return Global.mainModule.Check(Log, Current.SelectedFile)
|
||||
&& (target =Global.mainModule.getSelectedFile()).state.equals(FileState.Excluded);
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
target.Include();
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
UI.getMainWindow().getProjectWindow().getFilesTreeForm().getTree().RefreshNode(target.node);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user