eclipse plugin: move the classes to a better place

This commit is contained in:
Timotei Dolean 2010-07-20 22:02:45 +00:00
parent 1388b27756
commit b86b81f217
8 changed files with 18 additions and 23 deletions

View File

@ -10,7 +10,7 @@ package wesnoth_eclipse_plugin.action;
import org.eclipse.jface.action.IAction;
import wesnoth_eclipse_plugin.globalactions.MapActions;
import wesnoth_eclipse_plugin.utils.MapUtils;
public class ImportMap extends ObjectActionDelegate
{
@ -20,6 +20,6 @@ public class ImportMap extends ObjectActionDelegate
@Override
public void run(IAction action)
{
MapActions.importMap();
MapUtils.importMap();
}
}

View File

@ -10,7 +10,7 @@ package wesnoth_eclipse_plugin.action;
import org.eclipse.jface.action.IAction;
import wesnoth_eclipse_plugin.globalactions.PreprocessorActions;
import wesnoth_eclipse_plugin.utils.PreprocessorUtils;
import wesnoth_eclipse_plugin.utils.WMLTools;
import wesnoth_eclipse_plugin.utils.WMLTools.Tools;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
@ -20,12 +20,12 @@ public class RunWMLLintOnPreprocFile extends ObjectActionDelegate
@Override
public void run(IAction action)
{
PreprocessorActions.preprocessIfNotExists(
PreprocessorUtils.preprocessIfNotExists(
WorkspaceUtils.getSelectedFile(WorkspaceUtils.getWorkbenchWindow()),
true);
WMLTools.runWMLToolAsWorkspaceJob(Tools.WMLLINT,
PreprocessorActions.getPreprocessedFilePath(
PreprocessorUtils.getPreprocessedFilePath(
WorkspaceUtils.getSelectedFile(WorkspaceUtils.getWorkbenchWindow()),
false
)

View File

@ -10,7 +10,7 @@ package wesnoth_eclipse_plugin.action;
import org.eclipse.jface.action.IAction;
import wesnoth_eclipse_plugin.globalactions.PreprocessorActions;
import wesnoth_eclipse_plugin.utils.PreprocessorUtils;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
public class ShowPlainPreprocessedConfig extends ObjectActionDelegate
@ -18,7 +18,7 @@ public class ShowPlainPreprocessedConfig extends ObjectActionDelegate
@Override
public void run(IAction action)
{
PreprocessorActions.openPreprocessedFileInEditor(
PreprocessorUtils.openPreprocessedFileInEditor(
WorkspaceUtils.getSelectedFile(WorkspaceUtils.getWorkbenchWindow()),
true);
}

View File

@ -10,7 +10,7 @@ package wesnoth_eclipse_plugin.action;
import org.eclipse.jface.action.IAction;
import wesnoth_eclipse_plugin.globalactions.PreprocessorActions;
import wesnoth_eclipse_plugin.utils.PreprocessorUtils;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
public class ShowPreprocessedConfig extends ObjectActionDelegate
@ -18,6 +18,6 @@ public class ShowPreprocessedConfig extends ObjectActionDelegate
@Override
public void run(IAction action)
{
PreprocessorActions.openPreprocessedFileInEditor(WorkspaceUtils.getSelectedFile(), false);
PreprocessorUtils.openPreprocessedFileInEditor(WorkspaceUtils.getSelectedFile(), false);
}
}

View File

@ -27,9 +27,9 @@ import org.eclipse.core.runtime.Path;
import wesnoth_eclipse_plugin.Constants;
import wesnoth_eclipse_plugin.Logger;
import wesnoth_eclipse_plugin.globalactions.PreprocessorActions;
import wesnoth_eclipse_plugin.preferences.Preferences;
import wesnoth_eclipse_plugin.utils.AntUtils;
import wesnoth_eclipse_plugin.utils.PreprocessorUtils;
import wesnoth_eclipse_plugin.utils.ProjectUtils;
import wesnoth_eclipse_plugin.utils.StringUtils;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
@ -144,7 +144,7 @@ public class WesnothProjectBuilder extends IncrementalProjectBuilder
deleteMarkers(file);
monitor.subTask("Preprocessing...");
PreprocessorActions.preprocessFile(WorkspaceUtils.getPathRelativeToUserDir(file), WorkspaceUtils.getTemporaryFolder(), null, false);
PreprocessorUtils.preprocessFile(WorkspaceUtils.getPathRelativeToUserDir(file), WorkspaceUtils.getTemporaryFolder(), null, false);
monitor.worked(5);
// TODO: here be dragons

View File

@ -14,8 +14,8 @@ import org.eclipse.core.resources.IFolder;
import org.eclipse.swt.SWT;
import wesnoth_eclipse_plugin.Logger;
import wesnoth_eclipse_plugin.globalactions.MapActions;
import wesnoth_eclipse_plugin.utils.GUIUtils;
import wesnoth_eclipse_plugin.utils.MapUtils;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
public class ImportMapHandler extends AbstractHandler
@ -23,7 +23,7 @@ public class ImportMapHandler extends AbstractHandler
@Override
public Object execute(ExecutionEvent event)
{
MapActions.importMap();
MapUtils.importMap();
return null;
}

View File

@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package wesnoth_eclipse_plugin.globalactions;
package wesnoth_eclipse_plugin.utils;
import java.io.File;
@ -17,11 +17,8 @@ import org.eclipse.swt.widgets.FileDialog;
import wesnoth_eclipse_plugin.Activator;
import wesnoth_eclipse_plugin.Logger;
import wesnoth_eclipse_plugin.utils.GUIUtils;
import wesnoth_eclipse_plugin.utils.ResourceUtils;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
public class MapActions
public class MapUtils
{
/**
* Import a map file into the current directory

View File

@ -6,7 +6,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package wesnoth_eclipse_plugin.globalactions;
package wesnoth_eclipse_plugin.utils;
import java.io.File;
import java.util.ArrayList;
@ -21,10 +21,8 @@ import org.eclipse.ui.ide.IDE;
import wesnoth_eclipse_plugin.Constants;
import wesnoth_eclipse_plugin.Logger;
import wesnoth_eclipse_plugin.preferences.Preferences;
import wesnoth_eclipse_plugin.utils.ExternalToolInvoker;
import wesnoth_eclipse_plugin.utils.WorkspaceUtils;
public class PreprocessorActions
public class PreprocessorUtils
{
/**
* preprocesses a file using the wesnoth's executable
@ -117,7 +115,7 @@ public class PreprocessorActions
if (new File(WorkspaceUtils.getTemporaryFolder() + file.getName()).exists())
return;
PreprocessorActions.preprocessFile(WorkspaceUtils.getPathRelativeToUserDir(file),
PreprocessorUtils.preprocessFile(WorkspaceUtils.getPathRelativeToUserDir(file),
WorkspaceUtils.getTemporaryFolder(), null, waitForIt);
}
}