本文整理汇总了Java中lombok.installer.CorruptedIdeLocationException类的典型用法代码示例。如果您正苦于以下问题:Java CorruptedIdeLocationException类的具体用法?Java CorruptedIdeLocationException怎么用?Java CorruptedIdeLocationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CorruptedIdeLocationException类属于lombok.installer包,在下文中一共展示了CorruptedIdeLocationException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EclipseLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
EclipseLocation(String nameOfLocation, File pathToEclipseIni) throws CorruptedIdeLocationException {
this.name = nameOfLocation;
this.eclipseIniPath = pathToEclipseIni;
File p1 = pathToEclipseIni.getParentFile();
File p2 = p1 == null ? null : p1.getParentFile();
File p3 = p2 == null ? null : p2.getParentFile();
if (p1 != null && p1.getName().equals("Eclipse") && p2 != null && p2.getName().equals("Contents") && p3 != null && p3.getName().endsWith(".app")) {
this.pathToLombokJarPrefix = "../Eclipse/";
} else {
this.pathToLombokJarPrefix = "";
}
try {
this.hasLombok = checkForLombok(eclipseIniPath);
} catch (IOException e) {
throw new CorruptedIdeLocationException(
"I can't read the configuration file of the " + getTypeName() + " installed at " + name + "\n" +
"You may need to run this installer with root privileges if you want to modify that " + getTypeName() + ".", getTypeName(), e);
}
}
示例2: findIdes
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
/**
* Calls the OS-dependent 'find Eclipse' routine. If the local OS doesn't have a routine written for it,
* null is returned.
*
* @param locations
* List of valid eclipse locations - provide an empty list; this
* method will fill it.
* @param problems
* List of eclipse locations that seem to contain half-baked
* eclipses that can't be installed. Provide an empty list; this
* method will fill it.
*/
@Override
public void findIdes(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems) {
switch (getOS()) {
case WINDOWS:
new WindowsFinder().findEclipse(locations, problems);
break;
case MAC_OS_X:
new MacFinder().findEclipse(locations, problems);
break;
default:
case UNIX:
new UnixFinder().findEclipse(locations, problems);
break;
}
}
示例3: recurseDirectory0
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
private void recurseDirectory0(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems, File f, int loopCounter) {
//Various try/catch/ignore statements are in this for loop. Weird conditions on the disk can cause exceptions,
//such as an unformatted drive causing a NullPointerException on listFiles. Best action is almost invariably to just
//continue onwards.
File[] listFiles = f.listFiles();
if (listFiles == null) return;
for (File dir : listFiles) {
if (!dir.isDirectory()) continue;
try {
if (dir.getName().toLowerCase().contains(getDirName())) {
findEclipse(locations, problems, dir);
if (loopCounter < 50) recurseDirectory0(locations, problems, dir, loopCounter + 1);
}
} catch (Exception ignore) {}
}
}
示例4: findEclipse
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
private void findEclipse(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems, File dir) {
String eclipseLocation = findEclipseOnPlatform(dir);
if (eclipseLocation != null) {
try {
IdeLocation newLocation = createLocation(eclipseLocation);
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
}
}
示例5: EclipseLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
EclipseLocation(String nameOfLocation, File pathToEclipseIni) throws CorruptedIdeLocationException {
this.name = nameOfLocation;
this.eclipseIniPath = pathToEclipseIni;
try {
this.hasLombok = checkForLombok(eclipseIniPath);
} catch (IOException e) {
throw new CorruptedIdeLocationException(
"I can't read the configuration file of the " + getTypeName() + " installed at " + name + "\n" +
"You may need to run this installer with root privileges if you want to modify that " + getTypeName() + ".", getTypeName(), e);
}
}
示例6: makeLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
@Override protected IdeLocation makeLocation(String name, File ini) throws CorruptedIdeLocationException {
return new STSLocation(name, ini);
}
示例7: createLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
protected IdeLocation createLocation(String guess) throws CorruptedIdeLocationException {
return new EclipseLocationProvider().create0(guess);
}
示例8: recurseDirectory
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
protected void recurseDirectory(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems, File dir) {
recurseDirectory0(locations, problems, dir, 0);
}
示例9: create
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
@Override public IdeLocation create(String path) throws CorruptedIdeLocationException {
return create0(path);
}
示例10: makeLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
protected IdeLocation makeLocation(String name, File ini) throws CorruptedIdeLocationException {
return new EclipseLocation(name, ini);
}
示例11: JbdsLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
public JbdsLocation(String nameOfLocation, File pathToEclipseIni) throws CorruptedIdeLocationException {
super(nameOfLocation, pathToEclipseIni);
}
示例12: makeLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
@Override protected IdeLocation makeLocation(String name, File ini) throws CorruptedIdeLocationException {
return new JbdsLocation(name, ini);
}
示例13: createLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
@Override protected IdeLocation createLocation(String guess) throws CorruptedIdeLocationException {
return new JbdsLocationProvider().create0(guess);
}
示例14: STSLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
public STSLocation(String nameOfLocation, File pathToEclipseIni) throws CorruptedIdeLocationException {
super(nameOfLocation, pathToEclipseIni);
}
示例15: createLocation
import lombok.installer.CorruptedIdeLocationException; //导入依赖的package包/类
@Override protected IdeLocation createLocation(String guess) throws CorruptedIdeLocationException {
return new STSLocationProvider().create0(guess);
}