eclipse plugin: Get rid of the 'Reload files' menu item.

This commit is contained in:
Timotei Dolean 2011-08-08 21:26:39 +00:00
parent dd75660284
commit 0800424d62
4 changed files with 0 additions and 56 deletions

View file

@ -192,7 +192,6 @@ There are currently 2 types of menus: the context menus for different file/conta
\textit{Import map} - It will import a map in selected container.\\
\textit{Open editor} - Open the selected map in the game editor.\\
\textit{Setup workspace} - Will setup the workspace if it's not setup. This will open the preferences page if any preferences is missing, and then it will create the wesnoth project for mainline and user addons directories if you want.\\
\textit{Reload cache} - Reloads the internal cached files. Useful when the schema or other files have modified and you don't want to restart the plugin.\\
\textit{Open plugin's preferences} - Opens the plugin preferences page.\\
\end{description}

View file

@ -585,12 +585,6 @@
id="org.wesnoth.commands.setupWorkspace"
name="setupWorkspace">
</command>
<command
defaultHandler="org.wesnoth.handlers.ReloadFilesHandler"
description="Reloads all plugin related files"
id="org.wesnoth.commands.reloadFiles"
name="reloadFiles">
</command>
<command
defaultHandler="org.wesnoth.handlers.TestHandler"
id="org.wesnoth.commands.test"
@ -644,11 +638,6 @@
label="Setup Workspace"
style="push">
</command>
<command
commandId="org.wesnoth.commands.reloadFiles"
label="Reload cache"
style="push">
</command>
<command
commandId="org.eclipse.ui.window.preferences"
label="Open plugin&apos;s preferences"

View file

@ -1,42 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.handlers;
import java.util.Map.Entry;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.resources.IProject;
import org.wesnoth.Messages;
import org.wesnoth.projects.ProjectCache;
import org.wesnoth.projects.ProjectUtils;
import org.wesnoth.schema.SchemaParser;
import org.wesnoth.templates.TemplateProvider;
import org.wesnoth.utils.GUIUtils;
public class ReloadFilesHandler extends AbstractHandler
{
@Override
public Object execute( ExecutionEvent event )
{
SchemaParser.reloadSchemas( true );
TemplateProvider.getInstance( ).loadTemplates( );
// reload the cache only for already loaded files
for( Entry< IProject, ProjectCache > cache: ProjectUtils
.getProjectCaches( ).entrySet( ) ) {
cache.getValue( ).readDefines( true );
}
GUIUtils.showInfoMessageBox( Messages.ReloadFilesHandler_0 );
return null;
}
}

View file

@ -119,8 +119,6 @@ public class Define
new DefinesSAXHandler( ) );
if( handler != null ) {
Logger.getInstance( )
.log( "loaded " + handler.getDefines( ).size( ) + " defines for file:" + file ); //$NON-NLS-1$ //$NON-NLS-2$
return handler.getDefines( );
}