Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add working files #979

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions base/uk.ac.stfc.isis.ibex.e4.client/Application.e4xmi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<children xsi:type="menu:HandledMenuItem" xmi:id="_P4Pu4GcTEeeM7uzkT_ViHQ" elementId="uk.ac.stfc.isis.ibex.e4.client.handledmenuitem.switchinstrument" label="Switch instrument" command="_QRQe4JojEeeX2q28a93CXA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_SiBNgGcTEeeM7uzkT_ViHQ" elementId="uk.ac.stfc.isis.ibex.e4.client.handledmenuitem.managermode" label="Manager mode" command="_5YCA0JxFEeeX2q28a93CXA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_5Zx98KkiEeePZ9uSg3-JRA" elementId="uk.ac.stfc.isis.ibex.e4.client.handledmenuitem.exit" label="Exit IBEX Client" tooltip="Exits the IBEX client" command="_BQbKEKkjEeePZ9uSg3-JRA"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_UaoKcOODEemqa61T7hP03Q" elementId="uk.ac.stfc.isis.ibex.e4.client.handledmenuitem.resetlayout" label="Reset Layout" command="_NufGcJZmEeilnu5vNzjU3w"/>
</children>
<children xsi:type="menu:Menu" xmi:id="_9gU0oGbLEeeM7uzkT_ViHQ" elementId="uk.ac.stfc.isis.ibex.e4.client.menu.vieweditconfigurations" label="Configuration" mnemonics="C">
<children xsi:type="menu:DynamicMenuContribution" xmi:id="_6I3jYHkQEeeB_6PupPeR6A" elementId="uk.ac.stfc.isis.ibex.e4.client.dynamicmenucontribution.0" label="View or Edit Current Configuration (set by menu item)" contributionURI="bundleclass://uk.ac.stfc.isis.ibex.ui.configserver/uk.ac.stfc.isis.ibex.ui.configserver.commands.EditCurrentConfigHandler"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import javax.inject.Inject;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
Expand All @@ -13,7 +16,7 @@
/**
* Class containing the eclipse command to reset perspectives.
*/
public class ResetPerspective {
public class ResetPerspective extends AbstractHandler{

/**
* The application (injected by eclipse framework).
Expand All @@ -33,13 +36,23 @@ public class ResetPerspective {
@Inject
public EModelService modelService;

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
PerspectivesProvider provider = new PerspectivesProvider(app, partService, modelService);
PerspectiveResetAdapter resetAdapter = new PerspectiveResetAdapter(provider);
resetAdapter.resetPerspective();
return null;
}

/**
* Eclipse command to rest perspectives.
*/
@Execute
public void execute() {
PerspectivesProvider provider = new PerspectivesProvider(app, partService, modelService);
PerspectiveResetAdapter resetAdapter = new PerspectiveResetAdapter(provider);
resetAdapter.resetPerspective();
}
// @Execute
// public Object execute(ExecutionEvent event) {
// PerspectivesProvider provider = new PerspectivesProvider(app, partService, modelService);
// PerspectiveResetAdapter resetAdapter = new PerspectiveResetAdapter(provider);
// resetAdapter.resetPerspective();
// return null;
// }

}
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@
<unit id="org.eclipse.rcp.source.feature.group" version="4.12.0.v20190605-1801"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://www.pydev.org/update_sites/5.9.2"/>
<unit id="org.python.pydev.feature.feature.group" version="5.9.2.201708151115"/>
<unit id="org.python.pydev.feature.source.feature.group" version="5.9.2.201708151115"/>
<repository location="http://www.pydev.org/update_sites/7.3.0"/>
<unit id="org.python.pydev.feature.feature.group" version="7.3.0.201908161924"/>
<unit id="org.python.pydev.feature.source.feature.group" version="7.3.0.201908161924"/>
</location>
</locations>
<environment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import org.python.pydev.debug.newconsole.env.PydevIProcessFactory;
import org.python.pydev.debug.newconsole.env.PydevIProcessFactory.PydevConsoleLaunchInfo;
import org.python.pydev.plugin.PydevPlugin;
import org.python.pydev.ast.interpreter_managers.InterpreterManagersAPI;


import uk.ac.stfc.isis.ibex.logger.IsisLog;
import uk.ac.stfc.isis.ibex.preferences.PreferenceSupplier;
Expand Down Expand Up @@ -112,7 +114,7 @@ private void setInitialInterpreterCommands() {
* can throw several different exceptions
*/
PydevConsoleInterpreter createGeniePydevInterpreter() throws Exception {
IInterpreterManager manager = PydevPlugin.getPythonInterpreterManager(true);
IInterpreterManager manager = InterpreterManagersAPI.getPythonInterpreterManager(true);
IInterpreterInfo interpreterInfo = manager.createInterpreterInfo(new PreferenceSupplier().pythonInterpreterPath(),
monitor, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.python.pydev.core.IInterpreterInfo;
import org.python.pydev.core.IInterpreterManager;
import org.python.pydev.plugin.PydevPlugin;
import org.python.pydev.ast.interpreter_managers.InterpreterManagersAPI;

import uk.ac.stfc.isis.ibex.preferences.PreferenceSupplier;

Expand All @@ -40,7 +40,7 @@ private PyDevConfiguration() {
* Configure PyDev.
*/
public static void configure() {
IInterpreterManager iMan = PydevPlugin.getPythonInterpreterManager(true);
IInterpreterManager iMan = InterpreterManagersAPI.getPythonInterpreterManager(true);
NullProgressMonitor monitor = new NullProgressMonitor();
IInterpreterInfo interpreterInfo = iMan.createInterpreterInfo(new PreferenceSupplier().pythonInterpreterPath(),
monitor, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import org.python.pydev.ui.pythonpathconf.AbstractInterpreterProviderFactory;
import org.python.pydev.ui.pythonpathconf.AlreadyInstalledInterpreterProvider;
import org.python.pydev.ui.pythonpathconf.IInterpreterProvider;
import org.python.pydev.ast.interpreter_managers.IInterpreterProvider;

import uk.ac.stfc.isis.ibex.preferences.PreferenceSupplier;

Expand Down