Examples of findType()


Examples of org.eclipse.jdt.core.IJavaProject.findType()

                        IJavaProject javaProject = getJavaProject();
                        if (javaProject == null) {
                            activatorError = "Cannot validate activator class name, the bnd file is not in a Java project.";
                            activatorErrorLevel = IMessageProvider.WARNING;
                        } else {
                            IType activatorType = javaProject.findType(activatorClassName);
                            if (activatorType == null) {
                                activatorError = "The activator class name is not known in this project.";
                                activatorErrorLevel = IMessageProvider.ERROR;
                            }
                        }
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

                    try {
                        IJavaProject javaProject = getJavaProject();
                        if (javaProject == null)
                            return;

                        IType activatorType = javaProject.findType(activatorClassName);
                        if (activatorType != null) {
                            JavaUI.openInEditor(activatorType, true, true);
                        }
                    } catch (PartInitException e) {
                        ErrorDialog.openError(getManagedForm().getForm().getShell(), "Error", null,
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

                final List<IContentProposal> result = new ArrayList<IContentProposal>();

                final IRunnableWithProgress runnable = new IRunnableWithProgress() {
                    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                        try {
                            IType activatorType = javaProject.findType(BundleActivator.class.getName());
                            if (activatorType != null) {
                                ITypeHierarchy hierarchy = activatorType.newTypeHierarchy(javaProject, monitor);
                                for (IType subType : hierarchy.getAllSubtypes(activatorType)) {
                                    if (!Flags.isAbstract(subType.getFlags()) && subType.getElementName().toLowerCase().contains(prefix.toLowerCase())) {
                                        result.add(new JavaTypeContentProposal(subType));
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

    String project = conf.getAttribute(JunitLaunchListener.PROJ_ATTR, "");

    IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
    IJavaProject jproj = javaModel.getJavaProject(project);

    IType mockitType = jproj.findType("mockit.Mock");
    if (mockitType == null) {
      mockitType = jproj.findType("mockit.Mockit");
    }

    if (mockitType != null)
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

    IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
    IJavaProject jproj = javaModel.getJavaProject(project);

    IType mockitType = jproj.findType("mockit.Mock");
    if (mockitType == null) {
      mockitType = jproj.findType("mockit.Mockit");
    }

    if (mockitType != null)
    {
      IPackageFragmentRoot root = (IPackageFragmentRoot) mockitType
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

                        IFile file = getEditorFile();
                        if (file != null) {
                            IJavaProject javaProject = JavaCore.create(file.getProject());
                            try {
                                type = javaProject.findType(className);
                            } catch (JavaModelException e) {
                                ErrorDialog.openError(tree.getShell(), Messages.BundleCalculatedImportsPart_error, Messages.BundleCalculatedImportsPart_errorFindingType,
                                        new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, MessageFormat.format(Messages.BundleCalculatedImportsPart_errorOpeningClass, className), e));
                            }
                        }
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

    void doOpenSource(String name) {
        IJavaProject javaProj = getJavaProject();
        if (javaProj != null) {
            try {
                IType type = javaProj.findType(name);
                if (type != null)
                    JavaUI.openInEditor(type, true, true);
            } catch (PartInitException e) {
                e.printStackTrace();
            } catch (JavaModelException e) {
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

                    try {
                        IJavaProject javaProject = getJavaProject();
                        if (javaProject == null)
                            return;

                        IType activatorType = javaProject.findType(activatorClassName);
                        if (activatorType != null) {
                            JavaUI.openInEditor(activatorType, true, true);
                        }
                    } catch (PartInitException e) {
                        ErrorDialog.openError(getManagedForm().getForm().getShell(), "Error", null,
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

                final IRunnableWithProgress runnable = new IRunnableWithProgress() {
                    @Override
                    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                        try {
                            IType activatorType = javaProject.findType(BundleActivator.class.getName());
                            if (activatorType != null) {
                                ITypeHierarchy hierarchy = activatorType.newTypeHierarchy(javaProject, monitor);
                                for (IType subType : hierarchy.getAllSubtypes(activatorType)) {
                                    if (!Flags.isAbstract(subType.getFlags()) && subType.getElementName().toLowerCase().contains(prefix.toLowerCase())) {
                                        result.add(new JavaTypeContentProposal(subType));
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findType()

        // get the class declaration line
        IType type = unit.getType(controllerName);
        ITypeHierarchy superTypes = type.newSupertypeHierarchy(null);
//        String name = JapidController.class.getName(); // this will require play.jar
        String name = "cn.bran.play.JapidController";
        IType japidController = jProject.findType(name);
        if (superTypes.contains(japidController)) {
          useJapid = true;
        }
        else {
          useJapid = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.