polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [53/81] [abbrv] zest-java git commit: Stage 2 of the namespace change. Bulk of documentation fixed.
Date Fri, 31 Jul 2015 02:59:33 GMT
http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/common/vfs/VirtualFileUtil.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/common/vfs/VirtualFileUtil.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/common/vfs/VirtualFileUtil.java
deleted file mode 100644
index 53b3bc4..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/common/vfs/VirtualFileUtil.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.common.vfs;
-
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiFileSystemItem;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class VirtualFileUtil
-{
-    /**
-     * @param element element to process.
-     * @return The containing virtual file of the element.
-     * @since 0.1
-     */
-    @Nullable
-    public static VirtualFile getVirtualFile( @NotNull PsiElement element )
-    {
-        if( element instanceof PsiFileSystemItem )
-        {
-            PsiFileSystemItem fileSystemItem = (PsiFileSystemItem) element;
-            return fileSystemItem.getVirtualFile();
-        }
-
-        // If it's not a file system, assume that this is an element within a file
-        PsiFile containingFile = element.getContainingFile();
-        if( containingFile == null )
-        {
-            return null;
-        }
-
-        VirtualFile virtualFile = containingFile.getVirtualFile();
-        if( virtualFile != null )
-        {
-            return virtualFile;
-        }
-
-        PsiFile originalFile = containingFile.getOriginalFile();
-        if( originalFile == null )
-        {
-            return null;
-        }
-
-        return originalFile.getVirtualFile();
-    }
-
-    private VirtualFileUtil()
-    {
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/CreateConcernFromMixinTypeOrCompositeAction.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/CreateConcernFromMixinTypeOrCompositeAction.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/CreateConcernFromMixinTypeOrCompositeAction.java
deleted file mode 100644
index b762e3b..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/CreateConcernFromMixinTypeOrCompositeAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.qi4j.ide.plugin.idea.concerns.actions.create;
-
-import com.intellij.psi.PsiDirectory;
-import com.intellij.psi.PsiElement;
-import org.jetbrains.annotations.NotNull;
-import org.qi4j.ide.plugin.idea.common.actions.AbstractCreateElementActionBase;
-
-/**
- * @author edward.yakop@gmail.com
- */
-public class CreateConcernFromMixinTypeOrCompositeAction extends AbstractCreateElementActionBase
-{
-    public CreateConcernFromMixinTypeOrCompositeAction()
-    {
-        super( "TODO", "TODO" );
-    }
-
-    protected String getCommandName()
-    {
-        return "CreateConcernFromMixinTypeOrCompositeAction";
-    }
-
-    protected String getActionName( PsiDirectory directory, String newName )
-    {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    protected String getDialogPrompt()
-    {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    protected String getDialogTitle()
-    {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
-    }
-
-    @NotNull
-    protected PsiElement[] create( String newName, PsiDirectory directory )
-        throws Exception
-    {
-        return new PsiElement[0];  //To change body of implemented methods use File | Settings | File Templates.
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/inPackage/CreateConcernOfInPackageAction.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/inPackage/CreateConcernOfInPackageAction.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/inPackage/CreateConcernOfInPackageAction.java
deleted file mode 100644
index a82dc07..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/actions/create/inPackage/CreateConcernOfInPackageAction.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.concerns.actions.create.inPackage;
-
-import com.intellij.ide.actions.CreateInPackageActionBase;
-import com.intellij.openapi.actionSystem.DataContext;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.Messages;
-import com.intellij.psi.JavaDirectoryService;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiDirectory;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.search.GlobalSearchScope;
-import com.intellij.util.IncorrectOperationException;
-import org.jetbrains.annotations.NotNull;
-
-import static com.intellij.openapi.actionSystem.DataKeys.PROJECT;
-import static com.intellij.openapi.actionSystem.DataKeys.PSI_ELEMENT;
-import static com.intellij.util.Icons.CLASS_ICON;
-import static org.qi4j.ide.plugin.idea.common.psi.search.GlobalSearchScopeUtil.determineSearchScope;
-import static org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle.message;
-import static org.qi4j.ide.plugin.idea.concerns.common.Qi4jConcernConstants.TEMPLATE_GENERIC_CONCERN_OF;
-import static org.qi4j.ide.plugin.idea.concerns.common.Qi4jConcernUtil.getConcernOfClass;
-
-/**
- * JAVADOC: Non generic concern
- *
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public class CreateConcernOfInPackageAction extends CreateInPackageActionBase
-{
-    protected CreateConcernOfInPackageAction()
-    {
-        super( message( "createConcernOfInPackage.menu.action.text" ),
-               message( "createConcernOfInPackage.menu.action.description" ),
-               CLASS_ICON );
-    }
-
-    @Override
-    protected final boolean isAvailable( DataContext dataContext )
-    {
-        boolean isAvailable = super.isAvailable( dataContext );
-        if( !isAvailable )
-        {
-            return false;
-        }
-
-        PsiElement psiElement = PSI_ELEMENT.getData( dataContext );
-        if( psiElement == null )
-        {
-            return false;
-        }
-
-        GlobalSearchScope searchScope = determineSearchScope( psiElement );
-        if( searchScope == null )
-        {
-            return false;
-        }
-
-        Project project = PROJECT.getData( dataContext );
-        PsiClass psiClass = getConcernOfClass( project, searchScope );
-        return psiClass != null;
-    }
-
-    @NotNull
-    protected final PsiElement[] invokeDialog( Project project, PsiDirectory directory )
-    {
-        MyInputValidator validator = new MyInputValidator( project, directory );
-        Messages.showInputDialog( project, message( "createConcernOfInPackage.dlg.prompt" ),
-                                  message( "createConcernOfInPackage.dlg.title" ),
-                                  Messages.getQuestionIcon(), "", validator );
-        return validator.getCreatedElements();
-    }
-
-    protected final String getCommandName()
-    {
-        return message( "createConcernOfInPackage.command.name" );
-    }
-
-    protected final String getErrorTitle()
-    {
-        return message( "createConcernOfInPackage.error.title" );
-    }
-
-    protected final String getActionName( PsiDirectory directory, String newName )
-    {
-        return message( "createConcernOfInPackage.progress.text", newName );
-    }
-
-    protected final void doCheckCreate( final PsiDirectory dir, final String className )
-        throws IncorrectOperationException
-    {
-        JavaDirectoryService javaDirectoryService = JavaDirectoryService.getInstance();
-        javaDirectoryService.checkCreateClass( dir, className );
-    }
-
-    @NotNull
-    protected PsiClass doCreate( final PsiDirectory dir, final String className )
-        throws IncorrectOperationException
-    {
-        JavaDirectoryService javaDirectoryService = JavaDirectoryService.getInstance();
-        return javaDirectoryService.createClass( dir, className, TEMPLATE_GENERIC_CONCERN_OF );
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernConstants.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernConstants.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernConstants.java
deleted file mode 100644
index 57199be..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernConstants.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.concerns.common;
-
-import org.jetbrains.annotations.NonNls;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jConcernConstants
-{
-    public static final String QUALIFIED_NAME_CONCERNS = "org.qi4j.api.concern.Concerns";
-
-    public static final String QUALIFIED_NAME_CONCERN_OF = "org.qi4j.api.concern.ConcernOf";
-    public static final String QUALIFIED_NAME_GENERIC_CONCERN = "org.qi4j.api.concern.GenericConcern";
-
-    @NonNls
-    public static final String TEMPLATE_GENERIC_CONCERN_OF = "GenericConcernOf.java";
-
-    private Qi4jConcernConstants()
-    {
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernUtil.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernUtil.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernUtil.java
deleted file mode 100644
index 0771228..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/common/Qi4jConcernUtil.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.concerns.common;
-
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.*;
-import com.intellij.psi.codeStyle.JavaCodeStyleManager;
-import com.intellij.psi.search.GlobalSearchScope;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.List;
-
-import static com.intellij.codeInsight.AnnotationUtil.findAnnotation;
-import static java.util.Collections.emptyList;
-import static org.qi4j.ide.plugin.idea.common.psi.PsiAnnotationUtil.getAnnotationDefaultParameterValue;
-import static org.qi4j.ide.plugin.idea.common.psi.PsiAnnotationUtil.getClassReference;
-import static org.qi4j.ide.plugin.idea.common.psi.PsiClassUtil.getPSIClass;
-import static org.qi4j.ide.plugin.idea.common.psi.search.GlobalSearchScopeUtil.determineSearchScope;
-import static org.qi4j.ide.plugin.idea.concerns.common.Qi4jConcernConstants.*;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jConcernUtil
-{
-
-
-    /**
-     * @param searchContext Search context.
-     * @return {@code GenericConcern} psi class if found, {@code null} otherwise.
-     * @since 0.1
-     */
-    @Nullable
-    public static PsiClass getGenericConcernClass( @NotNull PsiElement searchContext )
-    {
-        Project project = searchContext.getProject();
-        GlobalSearchScope searchScope = determineSearchScope( searchContext );
-        return getGenericConcernClass( project, searchScope );
-    }
-
-    /**
-     * @param project project.
-     * @param scope   search scope.
-     * @return {@code GenericConcern} psi class if found, {@code null} otherwise.
-     * @since 0.1
-     */
-    @Nullable
-    public static PsiClass getGenericConcernClass( @NotNull Project project,
-                                                   @Nullable GlobalSearchScope scope )
-    {
-        JavaPsiFacade psiFacade = JavaPsiFacade.getInstance( project );
-        return scope != null ? psiFacade.findClass( QUALIFIED_NAME_GENERIC_CONCERN, scope ) : null;
-    }
-
-    @Nullable
-    public static PsiClass getConcernOfClass( @NotNull PsiElement searchContext )
-    {
-        Project project = searchContext.getProject();
-        GlobalSearchScope searchScope = determineSearchScope( searchContext );
-        return getConcernOfClass( project, searchScope );
-    }
-
-    @Nullable
-    public static PsiClass getConcernOfClass( @NotNull Project project,
-                                              @Nullable GlobalSearchScope scope )
-    {
-        JavaPsiFacade psiFacade = JavaPsiFacade.getInstance( project );
-        return scope != null ? psiFacade.findClass( QUALIFIED_NAME_CONCERN_OF, scope ) : null;
-    }
-
-    @Nullable
-    public static PsiAnnotation getConcernsAnnotation( @NotNull PsiElement element )
-    {
-        PsiClass psiClass = getPSIClass( element );
-        return findAnnotation( psiClass, QUALIFIED_NAME_CONCERNS );
-    }
-
-    @NotNull
-    public static PsiAnnotation addOrReplaceConcernAnnotation( @NotNull PsiModifierListOwner modifierListOwner,
-                                                               @NotNull PsiClass concernClassToAdd )
-    {
-        Project project = modifierListOwner.getProject();
-        JavaPsiFacade psiFacade = JavaPsiFacade.getInstance( project );
-        PsiElementFactory factory = psiFacade.getElementFactory();
-        PsiAnnotation existingConcernsAnnotation = findAnnotation( modifierListOwner, QUALIFIED_NAME_CONCERNS );
-
-        boolean isReplace = false;
-        PsiAnnotation newConcernsAnnotation;
-        if( existingConcernsAnnotation != null )
-        {
-            // Check duplicate
-            List<PsiAnnotationMemberValue> concernsValues = getConcernsAnnotationValue( existingConcernsAnnotation );
-            for( PsiAnnotationMemberValue concernValue : concernsValues )
-            {
-                PsiJavaCodeReferenceElement concernClassReference = getConcernClassReference( concernValue );
-                if( concernClassReference == null )
-                {
-                    continue;
-                }
-
-                PsiElement concernClass = concernClassReference.resolve();
-                if( concernClassToAdd.equals( concernClass ) )
-                {
-                    return existingConcernsAnnotation;
-                }
-            }
-
-            isReplace = true;
-        }
-
-        String concernAnnotationText = createConcernAnnotationText( existingConcernsAnnotation, concernClassToAdd );
-        newConcernsAnnotation =
-            factory.createAnnotationFromText( concernAnnotationText, modifierListOwner );
-
-        if( isReplace )
-        {
-            // Replace @Concerns instead
-            existingConcernsAnnotation.replace( newConcernsAnnotation );
-        }
-        else
-        {
-            // @Concerns doesn't exists, add it as first child
-            PsiModifierList modifierList = modifierListOwner.getModifierList();
-            modifierList.addBefore( newConcernsAnnotation, modifierList.getFirstChild() );
-        }
-
-        // Shorten all class references if possible
-        JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance( project );
-        codeStyleManager.shortenClassReferences( newConcernsAnnotation );
-
-        return newConcernsAnnotation;
-    }
-
-    @NotNull
-    private static String createConcernAnnotationText( @Nullable PsiAnnotation concernAnnotationBase,
-                                                       @NotNull PsiClass concernClassToAdd )
-    {
-        StringBuilder annotationTextBuilder = new StringBuilder();
-        annotationTextBuilder.append( "@" ).append( QUALIFIED_NAME_CONCERNS ).append( "( {" );
-        List<PsiAnnotationMemberValue> concernsAnnotationValue = getConcernsAnnotationValue( concernAnnotationBase );
-        for( PsiAnnotationMemberValue concernValue : concernsAnnotationValue )
-        {
-            annotationTextBuilder.append( concernValue.getText() ).append( ", " );
-        }
-        annotationTextBuilder.append( concernClassToAdd.getQualifiedName() ).append( ".class" );
-        annotationTextBuilder.append( "} )" );
-        return annotationTextBuilder.toString();
-    }
-
-    @NotNull
-    public static List<PsiAnnotationMemberValue> getConcernsAnnotationValue( @Nullable PsiAnnotation concernsAnnotation )
-    {
-        if( concernsAnnotation == null )
-        {
-            return emptyList();
-        }
-
-        String concernsQualifiedName = concernsAnnotation.getQualifiedName();
-        if( !QUALIFIED_NAME_CONCERNS.equals( concernsQualifiedName ) )
-        {
-            return emptyList();
-        }
-
-        return getAnnotationDefaultParameterValue( concernsAnnotation );
-    }
-
-    @Nullable
-    public static PsiJavaCodeReferenceElement getConcernClassReference( @NotNull PsiAnnotationMemberValue value )
-    {
-        return getClassReference( value );
-    }
-
-    /**
-     * @param psiClass psi class to check.
-     * @return {@code true} if {@code psiClass} extends {@code ConcernOf}, {@code false} if {@code psiClass} does
-     *         not extends {@code ConcernOf} or {@code ConcernOf} is not found.
-     * @since 0.1
-     */
-    public static boolean isAConcern( @NotNull PsiClass psiClass )
-    {
-        if( psiClass.isInterface() )
-        {
-            return false;
-        }
-
-        PsiClass concernOfClass = getConcernOfClass( psiClass );
-        return concernOfClass != null && psiClass.isInheritor( concernOfClass, true );
-    }
-
-    /**
-     * @param psiClass psi class to check.
-     * @return {@code true} if {@code psiClass} extends {@code GenericConcern}, {@code false} if {@code psiClass} does
-     *         not extends {@code GenericConcern} or {@code GenericConcern} is not found.
-     * @since 0.1
-     */
-    public static boolean isAGenericConcern( @NotNull PsiClass psiClass )
-    {
-        if( psiClass.isInterface() )
-        {
-            return false;
-        }
-
-        PsiClass genericConcern = getGenericConcernClass( psiClass );
-        return genericConcern != null && psiClass.isInheritor( genericConcern, true );
-    }
-
-    private Qi4jConcernUtil()
-    {
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/inspections/ConcernsAnnotationDeclaredCorrectlyInspection.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/inspections/ConcernsAnnotationDeclaredCorrectlyInspection.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/inspections/ConcernsAnnotationDeclaredCorrectlyInspection.java
deleted file mode 100644
index 5e74d9f..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/inspections/ConcernsAnnotationDeclaredCorrectlyInspection.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.concerns.inspections;
-
-import com.intellij.codeInspection.InspectionManager;
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiAnnotationMemberValue;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiJavaCodeReferenceElement;
-import com.intellij.psi.search.GlobalSearchScope;
-import org.jetbrains.annotations.NotNull;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractFix;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractInspection;
-import org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
-import static org.qi4j.ide.plugin.idea.common.psi.search.GlobalSearchScopeUtil.determineSearchScope;
-import static org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle.message;
-import static org.qi4j.ide.plugin.idea.concerns.common.Qi4jConcernUtil.*;
-
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class ConcernsAnnotationDeclaredCorrectlyInspection extends AbstractInspection
-{
-    @NotNull
-    protected final String resourceBundlePrefixId()
-    {
-        return "concerns.annotation.declared.correctly";
-    }
-
-    @NotNull
-    public final String getShortName()
-    {
-        return "ConcernsAnnotationDeclaredCorrectlyInspection";
-    }
-
-    @Override
-    public final ProblemDescriptor[] checkClass( @NotNull PsiClass psiClass,
-                                                 @NotNull InspectionManager manager,
-                                                 boolean isOnTheFly )
-    {
-        // If class does not have @Concerns, ignore
-        PsiAnnotation concernsAnnotation = getConcernsAnnotation( psiClass );
-        if( concernsAnnotation == null )
-        {
-            return null;
-        }
-
-        // If @Concerns declared in class, suggest remove @Concerns annotation
-        if( !psiClass.isInterface() )
-        {
-            String message = message( "concerns.annotation.declared.correctly.error.annotation.declared.in.class" );
-            RemoveConcernsAnnotationFix fix = new RemoveConcernsAnnotationFix( concernsAnnotation );
-            ProblemDescriptor problemDescriptor = manager.createProblemDescriptor( concernsAnnotation, message, fix,
-                                                                                   GENERIC_ERROR_OR_WARNING );
-            return new ProblemDescriptor[]{ problemDescriptor };
-        }
-
-        // If @Concerns annotation is empty, ignore
-        List<PsiAnnotationMemberValue> concernsAnnotationValue = getConcernsAnnotationValue( concernsAnnotation );
-        if( concernsAnnotationValue.isEmpty() )
-        {
-            return null;
-        }
-
-        // If ConcernOfClass is not resolved, ignore
-        Project project = psiClass.getProject();
-        GlobalSearchScope searchScope = determineSearchScope( psiClass );
-        PsiClass concernOfClass = getConcernOfClass( project, searchScope );
-        if( concernOfClass == null )
-        {
-            return null;
-        }
-
-        List<ProblemDescriptor> problems = new LinkedList<ProblemDescriptor>();
-        for( PsiAnnotationMemberValue concernClassAnnotationValue : concernsAnnotationValue )
-        {
-            PsiJavaCodeReferenceElement concernClassReference = getConcernClassReference( concernClassAnnotationValue );
-
-            // If it's not a class reference, ignore
-            if( concernClassReference == null )
-            {
-                continue;
-            }
-
-            // If class reference can't be resolved, ignore
-            PsiClass concernClass = (PsiClass) concernClassReference.resolve();
-            if( concernClass == null )
-            {
-                continue;
-            }
-
-            // If concern class does not inherit concern class, suggest remove that reference.
-            if( !concernClass.isInheritor( concernOfClass, true ) )
-            {
-                String message = Qi4jResourceBundle.message(
-                    "concerns.annotation.declared.correctly.error.concern.class.does.not.extend.ConcernOf",
-                    concernClass.getQualifiedName()
-                );
-
-                RemoveInvalidConcernClassReferenceFix fix = new RemoveInvalidConcernClassReferenceFix(
-                    concernClassAnnotationValue, concernClassReference
-                );
-                ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
-                    concernClassAnnotationValue, message, fix, GENERIC_ERROR_OR_WARNING );
-                problems.add( problemDescriptor );
-            }
-            else
-            {
-                // TODO: Test whether it is a generic concern
-                // TODO: Test whether it is a specific concern
-            }
-        }
-
-        return problems.toArray( new ProblemDescriptor[problems.size()] );
-    }
-
-    private static class RemoveConcernsAnnotationFix extends AbstractFix
-    {
-        private final PsiAnnotation annotationToRemove;
-
-        private RemoveConcernsAnnotationFix( @NotNull PsiAnnotation annotationToRemove )
-        {
-            super( message( "concerns.annotation.declared.correctly.fix.remove.annotation" ) );
-            this.annotationToRemove = annotationToRemove;
-        }
-
-        public final void applyFix( @NotNull Project project, @NotNull ProblemDescriptor descriptor )
-        {
-            annotationToRemove.delete();
-        }
-    }
-
-    private static class RemoveInvalidConcernClassReferenceFix extends AbstractFix
-    {
-        private final PsiAnnotationMemberValue concernClassAnnotationValue;
-
-        public RemoveInvalidConcernClassReferenceFix( @NotNull PsiAnnotationMemberValue annotationValueToRemove,
-                                                      @NotNull PsiJavaCodeReferenceElement concernClassReference )
-        {
-            super( message( "concerns.annotation.declared.correctly.fix.remove.concern.class.reference",
-                            concernClassReference.getQualifiedName() ) );
-            this.concernClassAnnotationValue = annotationValueToRemove;
-        }
-
-        public final void applyFix( @NotNull Project project, @NotNull ProblemDescriptor descriptor )
-        {
-            concernClassAnnotationValue.delete();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/intentions/add/AddConcernOnType.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/intentions/add/AddConcernOnType.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/intentions/add/AddConcernOnType.java
deleted file mode 100644
index 91517e4..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/concerns/intentions/add/AddConcernOnType.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.concerns.intentions.add;
-
-import com.intellij.openapi.editor.Editor;
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiMethod;
-import com.intellij.psi.search.GlobalSearchScope;
-import com.intellij.util.Processor;
-import com.intellij.util.Query;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.qi4j.ide.plugin.idea.common.intentions.AbstractIntention;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.intellij.psi.search.searches.ClassInheritorsSearch.search;
-import static java.util.Collections.emptyList;
-import static org.qi4j.ide.plugin.idea.common.psi.search.GlobalSearchScopeUtil.determineSearchScope;
-import static org.qi4j.ide.plugin.idea.concerns.common.Qi4jConcernUtil.addOrReplaceConcernAnnotation;
-import static org.qi4j.ide.plugin.idea.concerns.common.Qi4jConcernUtil.getConcernOfClass;
-
-/**
- * JAVADOC: This is disabled in Qi4jApplicationComponent.
- *
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class AddConcernOnType
-    extends AbstractIntention
-{
-    protected boolean isIntentionValidFor( PsiElement element )
-    {
-        if( !( element instanceof PsiClass ) )
-        {
-            return false;
-        }
-
-        // If it's not interface, ignore it
-        PsiClass psiClass = (PsiClass) element;
-        if( !psiClass.isInterface() )
-        {
-            return false;
-        }
-
-        // Is @Concerns accesible within module
-        GlobalSearchScope searchScope = determineSearchScope( psiClass );
-        PsiClass concernOfClass = getConcernOfClass( psiClass.getProject(), searchScope );
-        return concernOfClass != null;
-    }
-
-    protected final String resourceBundlePrefixId()
-    {
-        return "add.concern";
-    }
-
-    @Override
-    public boolean isAvailable( @NotNull Project project, Editor editor, @Nullable PsiElement element )
-    {
-        while( element != null )
-        {
-            if( element instanceof PsiFile ||
-                element instanceof PsiMethod )
-            {
-                break;
-            }
-
-            if( isIntentionValidFor( element ) )
-            {
-                return true;
-            }
-
-            element = element.getParent();
-        }
-
-        return false;
-    }
-
-    @SuppressWarnings( "unchecked" )
-    protected void processIntention( @NotNull Project project, @NotNull Editor editor, @NotNull PsiElement element )
-    {
-        PsiClass psiClass = (PsiClass) element;
-        List<PsiClass> concernCandidates = findConcernsCandidates( psiClass );
-        if( concernCandidates.size() == 1 )
-        {
-            PsiClass concernCandidate = concernCandidates.get( 0 );
-            addOrReplaceConcernAnnotation( psiClass, concernCandidate );
-        }
-    }
-
-    private static List<PsiClass> findConcernsCandidates( final @NotNull PsiClass classToCheck )
-    {
-        GlobalSearchScope searchScope = determineSearchScope( classToCheck );
-        PsiClass concernOfClass = getConcernOfClass( classToCheck.getProject(), searchScope );
-        if( concernOfClass == null )
-        {
-            return emptyList();
-        }
-
-        Query<PsiClass> psiClassQuery = search( concernOfClass, searchScope, true, false );
-        final List<PsiClass> concernCandidates = new ArrayList<PsiClass>();
-        psiClassQuery.forEach( new Processor<PsiClass>()
-        {
-            public boolean process( PsiClass psiClass )
-            {
-                // TODO: Ideally search for all "extends" as well
-                boolean isInheritor = psiClass.isInheritor( classToCheck, true );
-                if( isInheritor )
-                {
-                    concernCandidates.add( psiClass );
-                }
-
-                return true;
-            }
-        } );
-
-        return concernCandidates;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection.java
deleted file mode 100644
index 8d601ab..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.common.inspections;
-
-import com.intellij.codeInspection.InspectionManager;
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiMethod;
-import com.intellij.psi.PsiParameter;
-import com.intellij.psi.PsiParameterList;
-import org.jetbrains.annotations.NotNull;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractFix;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
-import static java.util.Arrays.asList;
-
-/**
- * {@code AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection} is a helper method to check whether
- * injection annotation are declared in either constructor or non static field.
- *
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public abstract class AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection
-    extends AbstractInjectionAnnotationDeclarationOnFieldInspection
-{
-    @Override
-    public final ProblemDescriptor[] checkMethod( @NotNull PsiMethod method,
-                                                  @NotNull InspectionManager manager,
-                                                  boolean isOnTheFly )
-    {
-        PsiParameterList parameterList = method.getParameterList();
-        PsiParameter[] parameters = parameterList.getParameters();
-        if( method.isConstructor() )
-        {
-            List<ProblemDescriptor> problems = new LinkedList<ProblemDescriptor>();
-            for( PsiParameter parameter : parameters )
-            {
-                PsiAnnotation annotation = getAnnotationToCheck( parameter );
-                if( annotation != null )
-                {
-                    ProblemDescriptor[] descriptors =
-                        verifyAnnotationDeclaredCorrectly( parameter, annotation, manager );
-                    if( descriptors != null )
-                    {
-                        problems.addAll( asList( descriptors ) );
-                    }
-                }
-            }
-
-            return problems.toArray( new ProblemDescriptor[problems.size()] );
-        }
-        else
-        {
-            List<ProblemDescriptor> problems = new LinkedList<ProblemDescriptor>();
-            for( PsiParameter parameter : parameters )
-            {
-                PsiAnnotation annotationToCheck = getAnnotationToCheck( parameter );
-                if( annotationToCheck != null )
-                {
-                    String message = getInjectionAnnotationValidDeclarationMessage();
-                    AbstractFix removeAnnotationFix = createRemoveAnnotationFix( annotationToCheck );
-                    ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
-                        annotationToCheck, message, removeAnnotationFix, GENERIC_ERROR_OR_WARNING
-                    );
-                    problems.add( problemDescriptor );
-                }
-            }
-
-            return problems.toArray( new ProblemDescriptor[problems.size()] );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldInspection.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldInspection.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldInspection.java
deleted file mode 100644
index cf2ffe9..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/common/inspections/AbstractInjectionAnnotationDeclarationOnFieldInspection.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.common.inspections;
-
-import com.intellij.codeInspection.InspectionManager;
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiField;
-import com.intellij.psi.PsiModifierList;
-import com.intellij.psi.PsiVariable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractFix;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractInspection;
-
-import static com.intellij.codeInsight.AnnotationUtil.findAnnotation;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public abstract class AbstractInjectionAnnotationDeclarationOnFieldInspection extends AbstractInspection
-{
-    /**
-     * @return Remove annotation message fix.
-     * @since 0.1
-     */
-    @NotNull
-    protected abstract String getRemoveAnnotationMessageFix();
-
-    /**
-     * @return Annotation to check qualified name.
-     * @since 0.1
-     */
-    @NotNull
-    protected abstract String getAnnotationToCheckQualifiedName();
-
-    /**
-     * Verified that {@link #getAnnotationToCheck(com.intellij.psi.PsiVariable)} is declared correctly.
-     *
-     * @param psiVariable       Variable to check. This could be class field member or constructor parameter.
-     * @param annotationToCheck annotation declared at variable to check.
-     * @param manager           Inspection manager to use to create problem descriptor.
-     * @return {@code null} if annotation is declared correctly, otherwise an array of problem descriptor.
-     * @since 0.1
-     */
-    @Nullable
-    protected abstract ProblemDescriptor[] verifyAnnotationDeclaredCorrectly( @NotNull PsiVariable psiVariable,
-                                                                              @NotNull PsiAnnotation annotationToCheck,
-                                                                              @NotNull InspectionManager manager );
-
-    @Override
-    public final ProblemDescriptor[] checkField( @NotNull PsiField field,
-                                                 @NotNull InspectionManager manager,
-                                                 boolean isOnTheFly )
-    {
-        PsiAnnotation annotationToCheck = getAnnotationToCheck( field );
-        if( annotationToCheck == null )
-        {
-            return null;
-        }
-
-        PsiModifierList modifierList = field.getModifierList();
-        if( modifierList != null )
-        {
-            if( modifierList.hasModifierProperty( com.intellij.psi.PsiModifier.STATIC ) )
-            {
-                String message = getInjectionAnnotationValidDeclarationMessage();
-                AbstractFix removeAnnotationFix = createRemoveAnnotationFix( annotationToCheck );
-                ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
-                    annotationToCheck, message, removeAnnotationFix, com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING
-                );
-
-                return new ProblemDescriptor[]{ problemDescriptor };
-            }
-        }
-
-        return verifyAnnotationDeclaredCorrectly( field, annotationToCheck, manager );
-    }
-
-    /**
-     * @param variable variable to check.
-     * @return Annotation to check.
-     * @see #getAnnotationToCheckQualifiedName()
-     * @since 0.1
-     */
-    @Nullable
-    protected final PsiAnnotation getAnnotationToCheck( @NotNull PsiVariable variable )
-    {
-        String annotationQualifiedName = getAnnotationToCheckQualifiedName();
-        return findAnnotation( variable, annotationQualifiedName );
-    }
-
-    @NotNull protected String getInjectionAnnotationValidDeclarationMessage()
-    {
-        String annotationQualifiedName = getAnnotationToCheckQualifiedName();
-        return org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle.message( "abstract.injection.annotation.declaration.inspection.error.annotation.not.declared.correctly",
-                                                                                    annotationQualifiedName );
-    }
-
-    @NotNull
-    protected final AbstractFix createRemoveAnnotationFix( @NotNull PsiAnnotation annotationToRemove )
-    {
-        String fixMessage = getRemoveAnnotationMessageFix();
-        return new RemoveAnnotationFix( fixMessage, annotationToRemove );
-    }
-
-    private static class RemoveAnnotationFix extends AbstractFix
-    {
-        private final PsiAnnotation annotationToRemove;
-
-        public RemoveAnnotationFix( @NotNull String fixMessage, @NotNull PsiAnnotation annotationToRemove )
-        {
-            super( fixMessage );
-            this.annotationToRemove = annotationToRemove;
-        }
-
-        public final void applyFix( @NotNull Project project, @NotNull ProblemDescriptor descriptor )
-        {
-            annotationToRemove.delete();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationConstants.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationConstants.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationConstants.java
deleted file mode 100644
index d77d0c5..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.invocation.common;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jInvocationAnnotationConstants
-{
-    public static final String QUALIFIED_NAME_INVOCATION_ANNOTATION = "org.qi4j.api.injection.scope.Invocation";
-
-    private Qi4jInvocationAnnotationConstants()
-    {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationUtil.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationUtil.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationUtil.java
deleted file mode 100644
index 3417d2c..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/common/Qi4jInvocationAnnotationUtil.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.invocation.common;
-
-import com.intellij.psi.*;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import static com.intellij.codeInsight.AnnotationUtil.findAnnotation;
-import static com.intellij.psi.PsiModifier.STATIC;
-import static org.qi4j.ide.plugin.idea.common.psi.PsiClassUtil.getPSIClass;
-import static org.qi4j.ide.plugin.idea.injections.invocation.common.Qi4jInvocationAnnotationConstants.QUALIFIED_NAME_INVOCATION_ANNOTATION;
-import static org.qi4j.ide.plugin.idea.injections.invocation.common.Qi4jInvocationAnnotationUtil.InvocationAnnotationDeclarationValidationResult.*;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.isInjecteableByStructureAnnotation;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jInvocationAnnotationUtil
-{
-    /**
-     * Returns {@code @Invocation} annotation if exists.
-     *
-     * @param modifierListOwner modifier list owner to process.
-     * @return {@code @Invocation} annotation if exists, {@code null} otherwise.
-     * @since 0.1
-     */
-    @Nullable
-    public static PsiAnnotation getInvocationAnnotation( @NotNull PsiModifierListOwner modifierListOwner )
-    {
-        return findAnnotation( modifierListOwner, QUALIFIED_NAME_INVOCATION_ANNOTATION );
-    }
-
-    /**
-     * @param psiClass psi class to check.
-     * @return {@code true} if the specified psiClass is injectable by invocation annotation, {@code false} otherwise.
-     */
-    public static boolean isInjectableByInvocationAnnotation( @NotNull PsiClass psiClass )
-    {
-        if( psiClass.isAnnotationType() )
-        {
-            return true;
-        }
-
-        String classQualifiedName = psiClass.getQualifiedName();
-        return "java.lang.reflect.Method".equals( classQualifiedName ) ||
-               "java.lang.reflect.AnnotatedElement".equals( classQualifiedName );
-    }
-
-    /**
-     * Validates whether the variable has {@code @Invocation} annotation declared correctly.
-     *
-     * @param variable variable to check.
-     * @return Look at {@link InvocationAnnotationDeclarationValidationResult}.
-     * @since 0.1
-     */
-    @NotNull
-    public static InvocationAnnotationDeclarationValidationResult isValidInvocationAnnotationDeclaration(
-        @NotNull PsiVariable variable )
-    {
-        PsiAnnotation invocationAnnotation = getInvocationAnnotation( variable );
-        if( invocationAnnotation == null )
-        {
-            return invalidInvocationAnnotationNotDeclared;
-        }
-
-        PsiModifierList modifierList = variable.getModifierList();
-        if( modifierList != null )
-        {
-            if( modifierList.hasModifierProperty( STATIC ) )
-            {
-                return invalidDeclaredOnStaticVariable;
-            }
-        }
-
-        // TODO: Check whether variable is either an instance of java.lang.reflect.Method or
-        // java.lang.reflect.AnnotatedElement or Annotation
-        PsiTypeElement typeElement = variable.getTypeElement();
-        if( typeElement != null )
-        {
-            PsiClass psiClass = getPSIClass( typeElement );
-            if( psiClass != null )
-            {
-                if( !isInjectableByInvocationAnnotation( psiClass ) )
-                {
-                    // Can't be type that is injected by @Structure
-                    if( isInjecteableByStructureAnnotation( variable ) )
-                    {
-                        return invalidTypeIsInjectedViaStructureAnnotation;
-                    }
-
-                    return invalidType;
-                }
-            }
-        }
-
-        return valid;
-    }
-
-    public enum InvocationAnnotationDeclarationValidationResult
-    {
-        invalidInvocationAnnotationNotDeclared,
-        invalidDeclaredOnStaticVariable,
-        invalidTypeIsInjectedViaStructureAnnotation,
-        invalidType,
-        valid,
-    }
-
-    private Qi4jInvocationAnnotationUtil()
-    {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/inspections/InvocationAnnotationDeclaredCorrectlyInspection.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/inspections/InvocationAnnotationDeclaredCorrectlyInspection.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/inspections/InvocationAnnotationDeclaredCorrectlyInspection.java
deleted file mode 100644
index d445b95..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/invocation/inspections/InvocationAnnotationDeclaredCorrectlyInspection.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.invocation.inspections;
-
-import com.intellij.codeInspection.InspectionManager;
-import com.intellij.codeInspection.LocalQuickFix;
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiVariable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.qi4j.ide.plugin.idea.injections.common.inspections.AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection;
-import org.qi4j.ide.plugin.idea.injections.structure.common.ReplaceWithStructureAnnotation;
-
-import static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
-import static org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle.message;
-import static org.qi4j.ide.plugin.idea.injections.invocation.common.Qi4jInvocationAnnotationConstants.QUALIFIED_NAME_INVOCATION_ANNOTATION;
-import static org.qi4j.ide.plugin.idea.injections.invocation.common.Qi4jInvocationAnnotationUtil.InvocationAnnotationDeclarationValidationResult;
-import static org.qi4j.ide.plugin.idea.injections.invocation.common.Qi4jInvocationAnnotationUtil.isValidInvocationAnnotationDeclaration;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.getStructureAnnotation;
-
-/**
- * {@code InvocationAnnotationDeclaredCorrectlyInspection} validates {@code @Invocation} injection annotation
- * declaration.
- *
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public class InvocationAnnotationDeclaredCorrectlyInspection
-    extends AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection
-{
-    @NotNull
-    protected final String resourceBundlePrefixId()
-    {
-        return "injections.invocation.annotation.declared.correctly";
-    }
-
-    @NotNull
-    public final String getShortName()
-    {
-        return "InvocationAnnotationDeclaredCorrectlyInspection";
-    }
-
-    @NotNull
-    protected final String getRemoveAnnotationMessageFix()
-    {
-        return message( "injections.invocation.annotation.declared.correctly.fix.remove.annotation" );
-    }
-
-    @NotNull
-    protected final String getAnnotationToCheckQualifiedName()
-    {
-        return QUALIFIED_NAME_INVOCATION_ANNOTATION;
-    }
-
-    @Nullable
-    protected final ProblemDescriptor[] verifyAnnotationDeclaredCorrectly( @NotNull PsiVariable psiVariable,
-                                                                           @NotNull PsiAnnotation invocationAnnotation,
-                                                                           @NotNull InspectionManager manager )
-    {
-        LocalQuickFix fix = null;
-        String message = null;
-
-        String variableTypeQualifiedName = psiVariable.getType().getCanonicalText();
-
-        InvocationAnnotationDeclarationValidationResult validationResult =
-            isValidInvocationAnnotationDeclaration( psiVariable );
-        switch( validationResult )
-        {
-        case invalidTypeIsInjectedViaStructureAnnotation:
-            if( getStructureAnnotation( psiVariable ) == null )
-            {
-                fix = new ReplaceWithStructureAnnotation(
-                    message( "injections.invocation.annotation.declared.correctly.fix.replace.with.structure.annotation" ),
-                    invocationAnnotation );
-            }
-            message = message(
-                "injections.invocation.annotation.declared.correctly.error.type.is.injected.by.structure",
-                variableTypeQualifiedName
-            );
-            break;
-
-        case invalidType:
-            message = message( "injections.invocation.annotation.declared.correctly.error.type.is.not.injectable",
-                               variableTypeQualifiedName );
-            break;
-        }
-
-        // If it's not an error, return null
-        if( message == null )
-        {
-            return null;
-        }
-
-        // If Fix not defined, by default we remove it.
-        if( fix == null )
-        {
-            fix = createRemoveAnnotationFix( invocationAnnotation );
-        }
-
-        ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
-            invocationAnnotation, message, fix, GENERIC_ERROR_OR_WARNING );
-        return new ProblemDescriptor[]{ problemDescriptor };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationConstants.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationConstants.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationConstants.java
deleted file mode 100644
index a47d974..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.service.common;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jServiceAnnotationConstants
-{
-    public static final String QUALIFIED_NAME_SERVICE_ANNOTATION = "org.qi4j.api.injection.scope.Service";
-
-    private Qi4jServiceAnnotationConstants()
-    {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationUtil.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationUtil.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationUtil.java
deleted file mode 100644
index dac9563..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/common/Qi4jServiceAnnotationUtil.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.service.common;
-
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiModifierList;
-import com.intellij.psi.PsiModifierListOwner;
-import com.intellij.psi.PsiVariable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import static com.intellij.codeInsight.AnnotationUtil.findAnnotation;
-import static com.intellij.psi.PsiModifier.STATIC;
-import static org.qi4j.ide.plugin.idea.injections.service.common.Qi4jServiceAnnotationConstants.QUALIFIED_NAME_SERVICE_ANNOTATION;
-import static org.qi4j.ide.plugin.idea.injections.service.common.Qi4jServiceAnnotationUtil.ServiceAnnotationDeclarationValidationResult.*;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.isInjecteableByStructureAnnotation;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jServiceAnnotationUtil
-{
-    /**
-     * Returns {@code @Service} annotation if exists.
-     *
-     * @param modifierListOwner modifier list owner to process.
-     * @return {@code @Service} annotation if exists, {@code null} otherwise.
-     * @since 0.1
-     */
-    @Nullable
-    public static PsiAnnotation getServiceAnnotation( @NotNull PsiModifierListOwner modifierListOwner )
-    {
-        return findAnnotation( modifierListOwner, QUALIFIED_NAME_SERVICE_ANNOTATION );
-    }
-
-    /**
-     * Validates whether the variable has {@code @Service} annotation declared correctly.
-     *
-     * @param variable variable to check.
-     * @return Look at {@link ServiceAnnotationDeclarationValidationResult}.
-     * @since 0.1
-     */
-    @NotNull
-    public static ServiceAnnotationDeclarationValidationResult isValidServiceAnnotationDeclaration(
-        @NotNull PsiVariable variable )
-    {
-        PsiAnnotation serviceAnnotation = getServiceAnnotation( variable );
-        if( serviceAnnotation == null )
-        {
-            return invalidServiceAnnotationNotDeclared;
-        }
-
-        PsiModifierList modifierList = variable.getModifierList();
-        if( modifierList != null )
-        {
-            if( modifierList.hasModifierProperty( STATIC ) )
-            {
-                return invalidDeclaredOnStaticVariable;
-            }
-        }
-
-        // Can't be type that is injected by @Structure
-        if( isInjecteableByStructureAnnotation( variable ) )
-        {
-            return invalidTypeIsInjectedViaStructureAnnotation;
-        }
-
-        return valid;
-    }
-
-    public enum ServiceAnnotationDeclarationValidationResult
-    {
-        invalidServiceAnnotationNotDeclared,
-        invalidDeclaredOnStaticVariable,
-        invalidTypeIsInjectedViaStructureAnnotation,
-        valid,
-    }
-
-    private Qi4jServiceAnnotationUtil()
-    {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/inspections/ServiceAnnotationDeclaredCorrectlyInspection.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/inspections/ServiceAnnotationDeclaredCorrectlyInspection.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/inspections/ServiceAnnotationDeclaredCorrectlyInspection.java
deleted file mode 100644
index 60e5bcd..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/service/inspections/ServiceAnnotationDeclaredCorrectlyInspection.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.service.inspections;
-
-import com.intellij.codeInspection.InspectionManager;
-import com.intellij.codeInspection.LocalQuickFix;
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiVariable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.qi4j.ide.plugin.idea.injections.common.inspections.AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection;
-import org.qi4j.ide.plugin.idea.injections.structure.common.ReplaceWithStructureAnnotation;
-
-import static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
-import static org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle.message;
-import static org.qi4j.ide.plugin.idea.injections.service.common.Qi4jServiceAnnotationConstants.QUALIFIED_NAME_SERVICE_ANNOTATION;
-import static org.qi4j.ide.plugin.idea.injections.service.common.Qi4jServiceAnnotationUtil.ServiceAnnotationDeclarationValidationResult;
-import static org.qi4j.ide.plugin.idea.injections.service.common.Qi4jServiceAnnotationUtil.isValidServiceAnnotationDeclaration;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.getStructureAnnotation;
-
-/**
- * {@code ServiceAnnotationDeclaredCorrectly} validates {@code @Service} injection annotation declaration.
- *
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public class ServiceAnnotationDeclaredCorrectlyInspection
-    extends AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection
-{
-    @NotNull
-    protected final String resourceBundlePrefixId()
-    {
-        return "injections.service.annotation.declared.correctly";
-    }
-
-    @NotNull
-    public final String getShortName()
-    {
-        return "ServiceAnnotationDeclaredCorrectlyInspection";
-    }
-
-    @NotNull
-    protected final String getRemoveAnnotationMessageFix()
-    {
-        return message( "injections.service.annotation.declared.correctly.fix.remove.annotation" );
-    }
-
-    @NotNull
-    protected final String getAnnotationToCheckQualifiedName()
-    {
-        return QUALIFIED_NAME_SERVICE_ANNOTATION;
-    }
-
-    @Nullable
-    protected final ProblemDescriptor[] verifyAnnotationDeclaredCorrectly( @NotNull PsiVariable psiVariable,
-                                                                           @NotNull PsiAnnotation serviceAnnotation,
-                                                                           @NotNull InspectionManager manager )
-    {
-        ServiceAnnotationDeclarationValidationResult annotationCheck =
-            isValidServiceAnnotationDeclaration( psiVariable );
-        String message = null;
-        LocalQuickFix fix = null;
-        switch( annotationCheck )
-        {
-        case invalidTypeIsInjectedViaStructureAnnotation:
-            if( getStructureAnnotation( psiVariable ) == null )
-            {
-                fix = new ReplaceWithStructureAnnotation(
-                    message( "injections.service.annotation.declared.correctly.fix.replace.with.structure.annotation" ),
-                    serviceAnnotation );
-            }
-            message = message(
-                "injections.service.annotation.declared.correctly.error.type.is.injected.by.structure",
-                psiVariable.getType().getCanonicalText()
-            );
-            break;
-        }
-
-        // If it's not an error, return null
-        if( message == null )
-        {
-            return null;
-        }
-
-        // Default behavior to remove @Service annotation
-        if( fix == null )
-        {
-            fix = createRemoveAnnotationFix( serviceAnnotation );
-        }
-
-        ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
-            serviceAnnotation, message, fix, GENERIC_ERROR_OR_WARNING );
-        return new ProblemDescriptor[]{ problemDescriptor };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationConstants.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationConstants.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationConstants.java
deleted file mode 100644
index bdaaa1b..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationConstants.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.structure.common;
-
-import static java.util.Arrays.sort;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jStructureAnnotationConstants
-{
-    public static final String QUALIFIED_NAME_STRUCTURE_ANNOTATION = "org.qi4j.api.injection.scope.Structure";
-
-    public static final String[] VALID_STRUCTURE_INJECTION_TYPE;
-
-    static
-    {
-        VALID_STRUCTURE_INJECTION_TYPE = new String[]
-            {
-                "org.qi4j.composite.CompositeBuilderFactory",
-                "org.qi4j.object.ObjectBuilderFactory",
-                "org.qi4j.entity.UnitOfWorkFactory",
-                "org.qi4j.service.ServiceFinder",
-                "org.qi4j.structure.Module",
-                "org.qi4j.structure.Layer",
-                "org.qi4j.structure.Application",
-                "org.qi4j.Qi4j",
-                "org.qi4j.spi.Qi4jSPI"
-            };
-        sort( VALID_STRUCTURE_INJECTION_TYPE );
-    }
-
-    private Qi4jStructureAnnotationConstants()
-    {
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationUtil.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationUtil.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationUtil.java
deleted file mode 100644
index b762e5e..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/Qi4jStructureAnnotationUtil.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.structure.common;
-
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.*;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import static com.intellij.codeInsight.AnnotationUtil.findAnnotation;
-import static com.intellij.psi.PsiModifier.STATIC;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationConstants.QUALIFIED_NAME_STRUCTURE_ANNOTATION;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationConstants.VALID_STRUCTURE_INJECTION_TYPE;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.StructureAnnotationDeclarationValidationResult.*;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jStructureAnnotationUtil
-{
-    /**
-     * Returns {@code Structure} annotation if exists.
-     *
-     * @param modifierListOwner Modifier list owner.
-     * @return @Structure annotation if exists, {@code null} otherwise.
-     * @since 0.1
-     */
-    @Nullable
-    public static PsiAnnotation getStructureAnnotation( @NotNull PsiModifierListOwner modifierListOwner )
-    {
-        return findAnnotation( modifierListOwner, QUALIFIED_NAME_STRUCTURE_ANNOTATION );
-    }
-
-    /**
-     * Create structure annotation.
-     *
-     * @param project project to create structure annotation.
-     * @param context the context to create structure annotation.
-     * @return @Structure annotation.
-     */
-    @NotNull
-    public static PsiAnnotation createStructureAnnotation( @NotNull Project project,
-                                                           @NotNull PsiElement context )
-    {
-        JavaPsiFacade psiFacade = JavaPsiFacade.getInstance( project );
-        PsiElementFactory factory = psiFacade.getElementFactory();
-        return factory.createAnnotationFromText( "@" + QUALIFIED_NAME_STRUCTURE_ANNOTATION, context );
-    }
-
-    /**
-     * @param variable variable to check.
-     * @return Look at {@link StructureAnnotationDeclarationValidationResult}.
-     * @since 0.1
-     */
-    @NotNull
-    public static StructureAnnotationDeclarationValidationResult validateStructureAnnotationDeclaration(
-        @NotNull PsiVariable variable )
-    {
-        PsiAnnotation structureAnnotation = getStructureAnnotation( variable );
-        if( structureAnnotation == null )
-        {
-            return invalidStructureAnnotationNotDeclared;
-        }
-
-        PsiModifierList modifierList = variable.getModifierList();
-        if( modifierList != null )
-        {
-            if( modifierList.hasModifierProperty( STATIC ) )
-            {
-                return invalidDeclaredOnStaticVariable;
-            }
-        }
-
-        if( !isInjecteableByStructureAnnotation( variable ) )
-        {
-            return invalidInjectionType;
-        }
-
-        return valid;
-    }
-
-    /**
-     * Returns a {@code boolean} indicator whether variable type is injectable by @Structure annotation.
-     *
-     * @param variable variable to check.
-     * @return {@code true} if variable type is injecteable by @Structure annotation.
-     * @since 0.1
-     */
-    public static boolean isInjecteableByStructureAnnotation( @NotNull PsiVariable variable )
-    {
-        PsiType type = variable.getType();
-        String fieldClassQualifiedName = type.getCanonicalText();
-        return binarySearch( VALID_STRUCTURE_INJECTION_TYPE, fieldClassQualifiedName ) > -1;
-    }
-
-    private Qi4jStructureAnnotationUtil()
-    {
-    }
-
-    public enum StructureAnnotationDeclarationValidationResult
-    {
-        invalidStructureAnnotationNotDeclared,
-        invalidDeclaredOnStaticVariable,
-        invalidInjectionType,
-        valid,
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/ReplaceWithStructureAnnotation.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/ReplaceWithStructureAnnotation.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/ReplaceWithStructureAnnotation.java
deleted file mode 100644
index 03e9b3e..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/common/ReplaceWithStructureAnnotation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.structure.common;
-
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.PsiAnnotation;
-import org.jetbrains.annotations.NotNull;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractFix;
-
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.createStructureAnnotation;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class ReplaceWithStructureAnnotation extends AbstractFix
-{
-    private final PsiAnnotation annotation;
-
-    public ReplaceWithStructureAnnotation( @NotNull String fixMessage,
-                                           @NotNull PsiAnnotation annotationToReplace )
-    {
-        super( fixMessage );
-        this.annotation = annotationToReplace;
-    }
-
-    public final void applyFix( @NotNull Project project, @NotNull ProblemDescriptor descriptor )
-    {
-        PsiAnnotation structureAnnotation = createStructureAnnotation( project, annotation );
-        annotation.replace( structureAnnotation );
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/inspections/StructureAnnotationDeclaredCorrectlyInspection.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/inspections/StructureAnnotationDeclaredCorrectlyInspection.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/inspections/StructureAnnotationDeclaredCorrectlyInspection.java
deleted file mode 100644
index cf906d7..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/injections/structure/inspections/StructureAnnotationDeclaredCorrectlyInspection.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.injections.structure.inspections;
-
-import com.intellij.codeInspection.InspectionManager;
-import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiVariable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.qi4j.ide.plugin.idea.common.inspections.AbstractFix;
-import org.qi4j.ide.plugin.idea.injections.common.inspections.AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection;
-
-import static com.intellij.codeInspection.ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
-import static org.qi4j.ide.plugin.idea.common.resource.Qi4jResourceBundle.message;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationConstants.QUALIFIED_NAME_STRUCTURE_ANNOTATION;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.StructureAnnotationDeclarationValidationResult;
-import static org.qi4j.ide.plugin.idea.injections.structure.common.Qi4jStructureAnnotationUtil.validateStructureAnnotationDeclaration;
-
-/**
- * {@code StructureAnnotationUsedCorrectly} validates {@code @Structure} injection annotation declaration.
- *
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public class StructureAnnotationDeclaredCorrectlyInspection
-    extends AbstractInjectionAnnotationDeclarationOnFieldAndConstructorInspection
-{
-    @NotNull
-    protected final String resourceBundlePrefixId()
-    {
-        return "injections.structure.annotation.declared.correctly";
-    }
-
-    @NotNull
-    public final String getShortName()
-    {
-        return "StructureAnnotationDeclaredCorrectlyInspection";
-    }
-
-    @NotNull
-    protected final String getRemoveAnnotationMessageFix()
-    {
-        return message( "injections.structure.annotation.declared.correctly.fix.remove.annotation" );
-    }
-
-    @NotNull
-    protected final String getAnnotationToCheckQualifiedName()
-    {
-        return QUALIFIED_NAME_STRUCTURE_ANNOTATION;
-    }
-
-    @Nullable
-    protected final ProblemDescriptor[] verifyAnnotationDeclaredCorrectly( @NotNull PsiVariable psiVariable,
-                                                                           @NotNull PsiAnnotation structureAnnotation,
-                                                                           @NotNull InspectionManager manager )
-    {
-        StructureAnnotationDeclarationValidationResult annotationCheck =
-            validateStructureAnnotationDeclaration( psiVariable );
-        switch( annotationCheck )
-        {
-        case invalidInjectionType:
-            String message = message(
-                "injections.structure.annotation.declared.correctly.error.invalid.injection.type",
-                psiVariable.getType().getCanonicalText()
-            );
-            AbstractFix removeStructureAnnotationFix = createRemoveAnnotationFix( structureAnnotation );
-            ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
-                structureAnnotation, message, removeStructureAnnotationFix, GENERIC_ERROR_OR_WARNING
-            );
-            return new ProblemDescriptor[]{ problemDescriptor };
-        }
-
-        return null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/8f20b315/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/mixins/common/Qi4jMixinConstants.java
----------------------------------------------------------------------
diff --git a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/mixins/common/Qi4jMixinConstants.java b/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/mixins/common/Qi4jMixinConstants.java
deleted file mode 100644
index aefef58..0000000
--- a/tools/qidea/src/main/java/org/qi4j/ide/plugin/idea/mixins/common/Qi4jMixinConstants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*  Copyright 2008 Edward Yakop.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied.
-*
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-package org.qi4j.ide.plugin.idea.mixins.common;
-
-/**
- * @author edward.yakop@gmail.com
- * @since 0.1
- */
-public final class Qi4jMixinConstants
-{
-    public static final String QUALIFIED_NAME_MIXINS = "org.qi4j.api.mixin.Mixins";
-
-    private Qi4jMixinConstants()
-    {
-    }
-}
\ No newline at end of file


Mime
View raw message