Lines 146-168
Link Here
|
146 |
File homeDir = new File(TargetPlatform.getLocation()); |
146 |
File homeDir = new File(TargetPlatform.getLocation()); |
147 |
if (!hasLaunchers) { |
147 |
if (!hasLaunchers) { |
148 |
if (homeDir.exists() && homeDir.isDirectory()) { |
148 |
if (homeDir.exists() && homeDir.isDirectory()) { |
149 |
buffer.append("absolute:file:"); //$NON-NLS-1$ |
149 |
appendAbsolutePath(buffer, new File(homeDir, "startup.jar")); //$NON-NLS-1$ |
150 |
buffer.append(new File(homeDir, "startup.jar").getAbsolutePath()); //$NON-NLS-1$ |
|
|
151 |
if (!TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$ |
150 |
if (!TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$ |
152 |
File file = new File(homeDir, "eclipse"); //$NON-NLS-1$ |
151 |
// try to retrieve the exact eclipse launcher path |
153 |
if (file.exists()) { |
152 |
// see bug 205833 |
154 |
buffer.append(",absolute:file:"); //$NON-NLS-1$ |
153 |
File file = null; |
155 |
buffer.append(file.getAbsolutePath()); |
154 |
if (System.getProperties().get("eclipse.launcher") != null) { //$NON-NLS-1$ |
156 |
} |
155 |
String launcherPath = System.getProperties().get("eclipse.launcher").toString(); //$NON-NLS-1$ |
157 |
file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$ |
156 |
file = new File(launcherPath); |
158 |
if (file.exists()) { |
157 |
if (file.exists() && !file.isDirectory()) { |
159 |
buffer.append(",absolute:file:"); //$NON-NLS-1$ |
158 |
appendAbsolutePath(buffer, file); |
160 |
buffer.append(file.getAbsolutePath()); |
159 |
} else { // just assume traditional eclipse paths |
|
|
160 |
appendEclipsePath(buffer, homeDir); |
161 |
} |
162 |
} else { // just assume traditional eclipse paths |
163 |
appendEclipsePath(buffer, homeDir); |
161 |
} |
164 |
} |
162 |
file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$ |
165 |
file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$ |
163 |
if (file.exists()) { |
166 |
if (file.exists()) { |
164 |
buffer.append(",absolute:file:"); //$NON-NLS-1$ |
167 |
appendAbsolutePath(buffer, file); |
165 |
buffer.append(file.getAbsolutePath()); |
|
|
166 |
} |
168 |
} |
167 |
} |
169 |
} |
168 |
} |
170 |
} |
Lines 175-180
Link Here
|
175 |
return buffer.toString(); |
177 |
return buffer.toString(); |
176 |
} |
178 |
} |
177 |
|
179 |
|
|
|
180 |
private void appendEclipsePath(StringBuffer buffer, File homeDir) { |
181 |
File file = null; |
182 |
file = new File(homeDir, "eclipse"); //$NON-NLS-1$ |
183 |
if (file.exists()) { |
184 |
appendAbsolutePath(buffer, file); |
185 |
} |
186 |
file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$ |
187 |
if (file.exists()) { |
188 |
appendAbsolutePath(buffer, file); |
189 |
} |
190 |
} |
191 |
|
192 |
private void appendAbsolutePath(StringBuffer buffer, File file) { |
193 |
if (buffer.length() > 0) |
194 |
buffer.append(","); //$NON-NLS-1$ |
195 |
|
196 |
buffer.append("absolute:file:"); //$NON-NLS-1$ |
197 |
buffer.append(file.getAbsolutePath()); |
198 |
} |
199 |
|
178 |
private void createEclipseProductFile() { |
200 |
private void createEclipseProductFile() { |
179 |
File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$ |
201 |
File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$ |
180 |
if (!dir.exists() || !dir.isDirectory()) |
202 |
if (!dir.exists() || !dir.isDirectory()) |