Package org.eclipse.php.internal.ui.editor.contentassist

Examples of org.eclipse.php.internal.ui.editor.contentassist.UseStatementInjector.inject()


            IType[] types = PhpModelAccess.getDefault().findTypes(null, type, MatchRule.EXACT, 0, 0, scope, new NullProgressMonitor());
           
            if (types.length == 1) {
              this.type = types[0];
              UseStatementInjector injector = new UseStatementInjector(this);
              injector.inject(document, viewer, offset);
            } else if (types.length > 1) {
             
              Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
             
              ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new TypeLabelProvider());
View Full Code Here


                Object[] result = dialog.getResult();
               
                if (result != null && result.length == 1) {
                  this.type = (IType) result[0];
                  UseStatementInjector injector = new UseStatementInjector(this);
                  injector.inject(document, viewer, offset);
                }
              }
            }
           
          } catch (BadLocationException e) {
View Full Code Here

            }
                     
            document.replace(miss.getInjectionOffset(), 0, code);
           
            UseStatementInjector injector = new UseStatementInjector(this);
            injector.inject(document, getTextViewer(), offset);
           
            //TODO: format code using new PDT formatter
            /*
            Formatter formatter = new Formatter();
            formatter.format(document);
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.