Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
merged from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail Plushnikov committed Feb 16, 2014
1 parent db415ae commit 0687fde
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 61 deletions.
25 changes: 0 additions & 25 deletions lombok-plugin/META-INF/plugin.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,6 @@ public static PsiCodeBlock createCodeBlockFromText(@NotNull String blockText, @N
return elementFactory.createCodeBlockFromText("{" + blockText + "}", psiClass);
}

public static PsiTypeParameterList createTypeParameterList(@NotNull PsiTypeParameterList psiTypeParameterList) {
PsiTypeParameter[] psiTypeParameters = psiTypeParameterList.getTypeParameters();
if (psiTypeParameters.length > 0) {

final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(psiTypeParameterList.getProject()).getElementFactory();

final StringBuilder builder = new StringBuilder("public <");

for (PsiTypeParameter psiTypeParameter : psiTypeParameters) {
builder.append(psiTypeParameter.getName());

PsiClassType[] superTypes = psiTypeParameter.getExtendsListTypes();
if (superTypes.length > 1 || superTypes.length == 1 && !superTypes[0].equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
builder.append(" extends ");
for (PsiClassType type : superTypes) {
if (type.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
continue;
}
builder.append(type.getCanonicalText()).append('&');
}
builder.deleteCharAt(builder.length() - 1);
}
builder.append(',');
}
builder.deleteCharAt(builder.length() - 1);

builder.append("> void foo(){}");

PsiMethod methodFromText = elementFactory.createMethodFromText(builder.toString(), null);
return methodFromText.getTypeParameterList();
}
return null;
}

@Nullable
public static PsiTypeParameterList createTypeParameterList(@NotNull PsiTypeParameterList psiTypeParameterList) {
PsiTypeParameter[] psiTypeParameters = psiTypeParameterList.getTypeParameters();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.lang.Integer;

public class Example<T> {
@lombok.Delegate
private Integer calcDelegatorInteger() {
Expand Down

0 comments on commit 0687fde

Please sign in to comment.