protected void handleContainerChanged() {

    String containerPathText = containerText.getText();

    containerStatus = JavaUtils.validateContainer(containerPathText);
    containerRoot = containerStatus.isOK() ? JavaUtils.createContainer(containerPathText) : null;

    packageCompletionProcessor.setPackageFragmentRoot(containerRoot);

    if (containerRoot != null) {
      project = containerRoot.getJavaProject().getProject();
    }

    refreshEntityViewer();

    doStatusUpdate();
  }
 private void initializeContainerText(Text targetText) {
   String text = ""; // $NON-NLS-1$
   if (project != null && project.isAccessible()) {
     IJavaProject javaProject = JavaCore.create(project);
     if (javaProject != null) {
       try {
         IPackageFragmentRoot srcPackage = JavaUtils.getSourcePackageFragmentRoot(javaProject);
         if (srcPackage != null) {
           text = javaProject.getElementName() + "/" + srcPackage.getElementName(); // $NON-NLS-1$
         }
       } catch (JavaModelException e) {
         AppEngineRPCPlugin.log(e);
       }
     }
   }
   targetText.setText(text);
 }
  private boolean inferContainerFromWorkbenchSelection() {

    project = findAppEngineProject(project);

    if (project != null && project.isAccessible()) {
      IJavaProject javaProject = JavaCore.create(project);
      if (javaProject != null) {
        try {
          containerRoot = JavaUtils.getSourcePackageFragmentRoot(javaProject);
          return true;
        } catch (JavaModelException e) {
          AppEngineRPCPlugin.log(e);
        }
      }
    }
    return false;
  }
 protected void handleTypeChanged() {
   typeStatus = JavaUtils.validateJavaTypeName(typeText.getText());
   doStatusUpdate();
 }
 public Iterable<IType> getEntityTypes() {
   return JavaUtils.asTypes(entityViewer.getCheckedElements());
 }