Skip to content

Commit da0432e

Browse files
author
angelozerr
committed
Export UI an dCore preferences classes.
1 parent 4d2f379 commit da0432e

File tree

8 files changed

+34
-13
lines changed

8 files changed

+34
-13
lines changed

eclipse/ts.eclipse.ide.core/META-INF/MANIFEST.MF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Export-Package: ts.eclipse.ide.core,
2828
ts.eclipse.ide.core.resources,
2929
ts.eclipse.ide.core.resources.buildpath,
3030
ts.eclipse.ide.core.resources.jsconfig,
31+
ts.eclipse.ide.core.resources.watcher,
3132
ts.eclipse.ide.core.tslint,
3233
ts.eclipse.ide.core.utils
3334
Bundle-ActivationPolicy: lazy

eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/core/resources/AbstractTypeScriptSettings.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@
1010
*/
1111
package ts.eclipse.ide.core.resources;
1212

13+
import java.io.File;
14+
1315
import org.eclipse.core.resources.IProject;
1416
import org.eclipse.core.resources.ProjectScope;
17+
import org.eclipse.core.runtime.IPath;
1518
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
1619
import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
1720
import org.eclipse.core.runtime.preferences.InstanceScope;
1821

22+
import ts.eclipse.ide.core.TypeScriptCorePlugin;
23+
import ts.utils.StringUtils;
24+
1925
/**
2026
* Abstract class for TypeScript settings which search preferences from the
2127
* given Eclipse Project Preferences and if not found from the workspace Eclipse
@@ -138,4 +144,12 @@ public void dispose() {
138144
public IProject getProject() {
139145
return project;
140146
}
147+
148+
protected File resolvePath(String path) {
149+
if (!StringUtils.isEmpty(path)) {
150+
IPath p = TypeScriptCorePlugin.getTypeScriptRepositoryManager().getPath(path, getProject());
151+
return p != null ? p.toFile() : new File(path);
152+
}
153+
return null;
154+
}
141155
}

eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/TypeScriptNatureTester.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/**
2+
* Copyright (c) 2015-2016 Angelo ZERR.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* Angelo Zerr <[email protected]> - initial API and implementation
10+
*/
111
package ts.eclipse.ide.internal.core;
212

313
import org.eclipse.core.expressions.PropertyTester;
@@ -11,6 +21,10 @@
1121
import ts.eclipse.ide.core.resources.buildpath.ITypeScriptRootContainer;
1222
import ts.eclipse.ide.core.utils.TypeScriptResourceUtil;
1323

24+
/**
25+
* TypeScript nature tester.
26+
*
27+
*/
1428
public class TypeScriptNatureTester extends PropertyTester {
1529

1630
private static final String IS_TYPESCRIPT_PROJECT_PROPERTY = "isTypeScriptProject";

eclipse/ts.eclipse.ide.core/src/ts/eclipse/ide/internal/core/resources/IDETypeScriptProjectSettings.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import java.io.File;
1414

1515
import org.eclipse.core.resources.IProject;
16-
import org.eclipse.core.resources.IResource;
17-
import org.eclipse.core.runtime.IPath;
1816
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
1917
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
2018

@@ -118,14 +116,6 @@ public File getTsserverFile() {
118116
return resolvedPath != null ? IDETypeScriptRepositoryManager.getTsserverFile(resolvedPath) : null;
119117
}
120118

121-
private File resolvePath(String path) {
122-
if (!StringUtils.isEmpty(path)) {
123-
IPath p = TypeScriptCorePlugin.getTypeScriptRepositoryManager().getPath(path, super.getProject());
124-
return p != null ? p.toFile() : new File(path);
125-
}
126-
return null;
127-
}
128-
129119
private ITypeScriptRepository getRepository(String preferenceName) {
130120
String name = super.getStringPreferencesValue(preferenceName, null);
131121
if (StringUtils.isEmpty(name)) {

eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/internal/ui/launch/shortcut/TypeScriptCompilerLaunchShortcut.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public void launch(IEditorPart editor, String mode) {
3939
}
4040

4141
private void launch(IContainer buildPath, String mode) {
42-
ILaunchConfigurationType tscLaunchConfiguraionType = DebugPlugin.getDefault().getLaunchManager()
42+
ILaunchConfigurationType tscLaunchConfigurationType = DebugPlugin.getDefault().getLaunchManager()
4343
.getLaunchConfigurationType(TypeScriptCompilerLaunchConstants.LAUNCH_CONFIGURATION_ID);
4444
try {
4545
// Check if configuration already exists
4646
ILaunchConfiguration[] configurations = DebugPlugin.getDefault().getLaunchManager()
47-
.getLaunchConfigurations(tscLaunchConfiguraionType);
47+
.getLaunchConfigurations(tscLaunchConfigurationType);
4848

4949
ILaunchConfiguration existingConfiguraion = chooseLaunchConfiguration(configurations, buildPath,
5050
TypeScriptCompilerLaunchConstants.BUILD_PATH);

eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/internal/ui/preferences/AbstractTypeScriptRepositoryConfigurationBlock.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import ts.eclipse.ide.core.TypeScriptCorePlugin;
2828
import ts.eclipse.ide.internal.ui.dialogs.IStatusChangeListener;
29+
import ts.eclipse.ide.ui.preferences.BrowseButtonsComposite;
2930
import ts.eclipse.ide.ui.preferences.OptionsConfigurationBlock;
3031
import ts.eclipse.ide.ui.preferences.ScrolledPageContent;
3132
import ts.repository.ITypeScriptRepository;

eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/internal/ui/preferences/ValidationConfigurationBlock.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import ts.eclipse.ide.core.preferences.TypeScriptCorePreferenceConstants;
2727
import ts.eclipse.ide.internal.ui.TypeScriptUIMessages;
2828
import ts.eclipse.ide.internal.ui.dialogs.IStatusChangeListener;
29+
import ts.eclipse.ide.ui.preferences.BrowseButtonsComposite;
2930
import ts.repository.ITypeScriptRepository;
3031

3132
/**

eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/internal/ui/preferences/BrowseButtonsComposite.java renamed to eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/ui/preferences/BrowseButtonsComposite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ts.eclipse.ide.internal.ui.preferences;
1+
package ts.eclipse.ide.ui.preferences;
22

33
import org.eclipse.core.resources.IProject;
44
import org.eclipse.core.resources.IResource;

0 commit comments

Comments
 (0)