Skip to content

Commit

Permalink
Sync with recent PDT changes
Browse files Browse the repository at this point in the history
Improvements in TI

Signed-off-by: Dawid Pakuła <zulus@w3des.net>
  • Loading branch information
zulus committed Sep 12, 2016
1 parent 10c35ac commit 309b39c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ public boolean equals(Object obj) {
} else if (this.getClass() != obj.getClass()) {
return false;
}

return serviceId.equals(((ServiceTypeGoal) obj).getServiceId());
}

@Override
public int hashCode() {
return 41 * serviceId.hashCode();
final int prime = 66;
int result = 1;
result = prime * result + serviceId.hashCode();
return result;
}

public String getServiceId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ private IGoal produceNextSubgoal(IGoal previousGoal,
}

if (state == STATE_GOT_RECEIVER) {
state = STATE_WAITING_SERVICE_TYPE;
IModelAccessCache accessCache = null;
if (goal.getContext() instanceof IModelCacheContext) {
accessCache = ((IModelCacheContext)goal.getContext()).getCache();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private IGoal produceNextSubgoal(IGoal previousGoal,
}

if (state == STATE_GOT_RECEIVER) {
state = STATE_WAITING_SERVICE_TYPE;
IModelAccessCache accessCache = null;
if (goal.getContext() instanceof IModelCacheContext) {
accessCache = ((IModelCacheContext)goal.getContext()).getCache();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.dubture.symfony.core.launch;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.php.composer.core.launch.environment.AbstractEnvironmentFactory;
import org.eclipse.php.composer.core.launch.environment.PrjPharEnvironment;

Expand All @@ -14,10 +13,6 @@ public class SymfonyEnvironmentFactory extends AbstractEnvironmentFactory {

public static final String FACTORY_ID = "com.dubture.symfony.core.launcherfactory";

@Override
protected IPreferenceStore getPreferenceStore() {
return SymfonyCorePlugin.getDefault().getPreferenceStore();
}

@Override
protected String getPluginId() {
Expand All @@ -43,4 +38,9 @@ protected String getUseProjectKey() {
protected String getScriptKey() {
return Keys.CONSOLE;
}

@Override
protected String getPreferenceQualifier() {
return SymfonyCorePlugin.ID;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.pdtextensions.core.ui.preferences.PHPExecutableChangeListener;

import org.eclipse.php.composer.ui.ComposerUIPlugin;
import com.dubture.symfony.core.SymfonyCorePlugin;
import com.dubture.symfony.core.SymfonyCorePlugin;
import com.dubture.symfony.core.log.Logger;
import com.dubture.symfony.core.preferences.CorePreferenceConstants.Keys;
import com.dubture.symfony.ui.editor.template.CodeTemplateContextType;
Expand Down Expand Up @@ -82,13 +82,6 @@ public void start(BundleContext context) throws Exception {
}
}

/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
* )
*/
public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.php.composer.core.buildpath.BuildPathManager;
import org.eclipse.php.internal.core.PHPVersion;
import org.eclipse.php.internal.core.project.PHPNature;
import org.eclipse.ui.IImportWizard;
Expand All @@ -34,8 +35,6 @@
import org.eclipse.ui.internal.wizards.datatransfer.DataTransferMessages;
import org.osgi.service.prefs.BackingStoreException;

import org.eclipse.php.composer.core.ComposerNature;
import org.eclipse.php.composer.core.buildpath.BuildPathManager;
import com.dubture.symfony.core.SymfonyCorePlugin;
import com.dubture.symfony.core.SymfonyVersion;
import com.dubture.symfony.core.builder.SymfonyNature;
Expand Down Expand Up @@ -109,7 +108,7 @@ public void run(IProgressMonitor monitor) throws InvocationTargetException, Inte
project.open(monitor);
monitor.worked(1);

applyNatures(new String[]{PHPNature.ID, SymfonyNature.NATURE_ID, ComposerNature.NATURE_ID }, project, monitor);
applyNatures(new String[]{PHPNature.ID, SymfonyNature.NATURE_ID }, project, monitor);

IScriptProject scriptProject = DLTKCore.create(project);
IFile vendorPath = project.getFile(SymfonyCoreConstants.VENDOR_PATH);
Expand Down

0 comments on commit 309b39c

Please sign in to comment.