Skip to content

Commit 5d3cddf

Browse files
committed
Fixing update ref issue with eclipse plugin
1 parent 5777792 commit 5d3cddf

File tree

7 files changed

+52
-9
lines changed

7 files changed

+52
-9
lines changed

src/AndroidClient/.idea/encodings.xml

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AndroidClient/.idea/gradle.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AndroidClient/.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServiceStackEclipse/ServiceStackEclipse.Bundle/net.servicestack.eclipse.iml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
3+
<component name="FacetManager">
4+
<facet type="Osmorc" name="OSGi">
5+
<configuration manifestGenerationMode="Manually" manifestLocation="META-INF/MANIFEST.MF" jarfileLocation="net.servicestack.eclipse.jar" outputPathType="CompilerOutputPath" bndFileLocation="" bundlorFileLocation="" bundleActivator="" bundleSymbolicName="" bundleVersion="1.0.0" ignoreFilePattern="" useProjectDefaultManifestFileLocation="false" alwaysRebuildBundleJAR="false" doNotSynchronizeWithMaven="false">
6+
<additionalProperties />
7+
<additionalJARContents />
8+
</configuration>
9+
</facet>
10+
</component>
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
412
<output url="file://$MODULE_DIR$/target/classes" />
513
<output-test url="file://$MODULE_DIR$/target/test-classes" />
614
<content url="file://$MODULE_DIR$">

src/ServiceStackEclipse/ServiceStackEclipse.Bundle/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<version>1.0.6-SNAPSHOT</version>
8+
<build>
9+
<plugins>
10+
<plugin>
11+
<groupId>org.apache.maven.plugins</groupId>
12+
<artifactId>maven-compiler-plugin</artifactId>
13+
<configuration>
14+
<source>1.7</source>
15+
<target>1.7</target>
16+
</configuration>
17+
</plugin>
18+
</plugins>
19+
</build>
820
<artifactId>net.servicestack.eclipse</artifactId>
921
<packaging>eclipse-plugin</packaging>
1022
<name>ServiceStackEclipse.Bundle</name>

src/ServiceStackEclipse/ServiceStackEclipse.Bundle/src/main/java/net/servicestack/eclipse/nativetypes/JavaNativeTypesHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Map<String, String> parseComments(String codeOutput) {
2020
while (scanner.hasNextLine()) {
2121
String line = scanner.nextLine();
2222
linesOfCode.add(line);
23-
if(line.startsWith("*/")) break;
23+
if(line.trim().startsWith("*/")) break;
2424
}
2525
scanner.close();
2626

@@ -65,7 +65,7 @@ public String generateUrl(String baseUrl, Map<String, String> options) {
6565
try {
6666
url = new URL(baseUrl);
6767
} catch (MalformedURLException e1) {
68-
// TODO Auto-generated catch block
68+
6969
e1.printStackTrace();
7070
return null;
7171
}
@@ -117,7 +117,7 @@ public String getUpdatedCode(String baseUrl, Map<String, String> options) throws
117117
}
118118

119119
String javaCode = javaCodeResponse.toString();
120-
if (!javaCode.startsWith("/* Options:")) {
120+
if (!javaCode.trim().startsWith("/* Options:")) {
121121
return null;
122122
}
123123
result = javaCode;
@@ -136,7 +136,7 @@ public boolean validateServiceStackEndpoint(String baseUrl) throws IOException {
136136
}
137137

138138
public boolean isFileAServiceStackReference(String fileContents) {
139-
return fileContents.startsWith("/* Options:");
139+
return fileContents.trim().startsWith("/* Options:");
140140
}
141141

142142

src/ServiceStackEclipse/ServiceStackEclipse.Bundle/src/main/java/net/servicestack/eclipse/testers/SelectionTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public boolean test(Object receiver, String property, Object[] args, Object expe
5656
try {
5757
for(int i = 0; i < 10; i++) {
5858
String line = br.readLine();
59-
if(line.startsWith("/* Options:")) {
59+
if(line.trim().startsWith("/* Options:")) {
6060
UpdateReferenceCurrentSelection.getInstance().UpdateReferenceFile = file;
6161
return true;
6262
}

0 commit comments

Comments
 (0)