Files
VisualSapfor/src/_VisualDVM/Passes/All/IncludeSelectedFiles.java

32 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package _VisualDVM.Passes.All;
import Common.Passes.Pass;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.ProjectData.Files.DBProjectFile;
import java.util.Vector;
public class IncludeSelectedFiles extends Pass<Vector<DBProjectFile>> {
@Override
public String getIconPath() {
return "/icons/Include.png";
}
@Override
protected boolean canStart(Object... args) {
if (!Global.files_multiselection) {
Log.Writeln_("Нажмите правую клавишу мыши, и перейдите в режим выбора файлов.");
return false;
}
target = Global.mainModule.getProject().db.files.getSelectedItems();
if (target.isEmpty()) {
Log.Writeln_("Не отмечено ни одного файла.");
return false;
}
return true;
}
@Override
protected void body() throws Exception {
for (DBProjectFile file : target)
Global.mainModule.getPass(PassCode.IncludeFile).Do(file);
}
}