IDE_ProjectFrameProvider.java :  » IDE » Schmortopf » Schmortopf » Main » Java Open Source

Java Open Source » IDE » Schmortopf 
Schmortopf » Schmortopf » Main » IDE_ProjectFrameProvider.java
package Schmortopf.Main;
  
  
  /**       
   *  A Wannabe Readonly Adaptor, which provides IDE_ProjectFrame methods
   *  and prevents the compiler from compiling the IDE_ProjectFrame
   *  and all further classes in the import scope, when a class
   *  which needs methods from the IDE_ProjectFrame had to be compiled.
   */

                   
import java.awt.Container;
import java.awt.Dimension; 
import javax.swing.JInternalFrame;
import javax.swing.ImageIcon;
import javax.swing.JMenuBar;
import javax.swing.JFrame;        
import java.net.URL;    
import javax.swing.tree.DefaultMutableTreeNode;
                                                    
import Schmortopf.OutputManager.OutputManager;
import Schmortopf.ProjectFiles.ProjectFilesManager;
import Schmortopf.ProjectFiles.ProjectFilesTree.ProjectFilesTreeLeafObject;
import Schmortopf.FileStructure.FileStructureDescriptionManager;
import Schmortopf.FileStructure.Descriptions.FileStructureDescription;
import Schmortopf.JavaSourceEditor.EditorPanel;
import Schmortopf.Libraries.LibrariesTree; 
import Schmortopf.FileComponents.View.FileComponentsTree;
import Schmortopf.Utility.IniFile.IniFile;




public interface IDE_ProjectFrameProvider
{
                           

 /**
  *  Loads an imageicon. Works when this application
  *  was started in a JAR file, as well when started
  *  from the main class file.
  */
  public ImageIcon loadImageIcon(String name);

      
  public String getSchmortopfMainDirectory();
  

  public OutputManager getOutputManager();


  public ProjectFilesManager getProjectFilesManager();


  public IniFile getProjectIniFile();


  public String getProjectDirectoryPath();


  public LibrariesTree getLibrariesTree();


  public FileComponentsTree getFileComponentsTree();


  public FileStructureDescriptionManager getFileStructureDescriptionManager();
  

  public EditorPanel getEditorPanel();




  /**                       
   *  Called by the CompilerThread on errors, and by ghe DocumentButtonPaneModel,
   *  which is the model for the projectfiles history.
   *  Returns false, if a leaf with the passed pathname has not been found.
   */
   public boolean selectProjectFilesTreeNodeFor( final String sourceFilePathName,
                                                 final int line,
                                                 final int column,
                                                 final boolean doSelectLine );



 /**
  *  This is called by SearchResultsTree.searchTheCompleteProjectForText(),
  *  after a search, if something was found. It should make sure,
  *  that the panel with the searchresultstree inside is visible by
  *  moving the splitpane a bit, if needed.
  */
  public void popupSearchResultsTreePanel();


                                                      
 /**
  *  Called when a projectfile is selected in the projectfiles tree,
  *  which causes the selections on the links tree to get out of sync.
  */
  public void clearSelectionsInProjectFilesLinkTree();
     


 /**
  *  Called by selectLibrariesTreeNodeFor to make sure, at least one entry
  *  of the librariestree is visible, once the selection of it changes.
  */
  public void checkPopupLibrariesTreePanel();


                               

 /**
  *  Called by the compiler when it has found syntax errors
  *  to make sure, at least one entry of the librariestree is visible,
  *  once the selection of it changes.
  */
  public void checkPopupCompilerOutputPanel();


                          
  /**
   *  Searches the source of the passed qualifiedClassName, which must be a classname of
   *  a (member or local) attribute of the passed basisFSD.
   *  The search combines the qualifiedClassName with all import statements
   *  of the basisFSD for this purpose.
   *  If the class isn't in the same package and not part of a wildcard or
   *  specific import statement, it must be qualified ( f.ex. jawa.awt.frame )
   *  The search is made, like the javac compiler also performs it on compiling.
   *  If the basisFSD was made from a syntactically correct (=compilable) source,
   *  this method will find and display the associated source
   *  (or decompiled class view) for sure.
   *
   *  If the fsd associated with the qualifiedClassName is found,
   *  the source will be displayed automatically.
   */
   public void displayClassPartOfFSD( final FileStructureDescription basisFSD,
                                      final String qualifiedClassName );



   /**
    *  Synchronizes the project with the files on disk.
    *  Saves and reloads all.
    */
    public void synchronizeTheProject();


   /**
    *  Programmatically pushes the compile project button.
    *  Used by the EditorPanel for the F9 keystroke.
    */
    public void compileProject();



 /**
  *  Saves all changed projectfiles, if there exist changed files at all.
  *  If doDisplayDialog is set however, a dialog is displayed and
  *  the user can cancel the save operation.
  *  If doDisplayDialog is false, changed files are saved automatically.
  *
  *  MUST be called outside the Swing EventDispatchThread.
  *
  *  Returns true, if the user has affirmed, false if he had cancelled it.
  *
  */
  public boolean checkSaveProjectFiles( final boolean doDisplayDialog );


   /**
    *  Programmatically pushes the execute project button.
    *  Used by the EditorPanel for the F10 keystroke.
    */
    public void executeProject();


   /**
    *  Programmatically pushes the execute file button.
    *  Used by the EditorPanel for the Shift F10 keystroke.
    */
    public void executeCurrentFile();


    public void initializeFileComponentsTreeFrom( final FileStructureDescription fsd );





  /**
   *  In the LibrariesTree it should expand the node and show the document
   *  associated with the passed arguments, as if one had cklicked
   *  on that node with the mouse.
   *  Delegated to the LibrariesTree controler.
   *  Returns false, if the associated leaf has not been found.
   */
   public boolean selectLibrariesTreeNodeFor( final String jarFileName,
                                              final String fileName,
                                              final int lineNumber,
                                              final int columnNumber );



  /**
   *  Called by the ProjectFilesTreePopupMenu.
   *  Controler method, delegated to the searchResultsTree.
   *  Information goes to the searchResultsTree.
   */
   public void searchProjectDirectoryForText( final DefaultMutableTreeNode directoryNode );
  /**
   *  Same for libraries
   */
   public void searchLibraryDirectoryForText( final DefaultMutableTreeNode directoryNode );


  /**
   *  Called by the ProjectFilesTreePopupMenu.
   *  Controler method, delegated to the searchResultsTree.
   *  Information goes to the searchResultsTree.
   */
   public void searchProjectDirectoryForFilename( final DefaultMutableTreeNode directoryNode );
  /**
   *  Same for libraries
   */
   public void searchLibraryDirectoryForFilename( final DefaultMutableTreeNode directoryNode );


  /**
   *  Called by the editorpanel.
   *  Controler method, delegated to the searchResultsTree.
   *  Information goes from editorpanel (back) to the searchResultsTree.
   */                         
   public void searchTheCompleteProjectForText( String searchText,
                                                boolean doCaseSensitiveSearch,
                                                boolean doWholeWordsSearch,
                                                boolean doApproximateSearch,
                                                final boolean doSearchComments,
                                                final boolean doIncludeProjectFiles,
                                                final boolean doIncludeLibraries,
                                                final int approximateSearchMethodIndex,
                                                final int approximateSearchTolerance    );
    



 /**
  *  Called from the ProjectFilesTreePopupMenu on rightclicks.
  *  Adds a depository button for this projectfiles.
  */                                                      
  public void addNewProjectFileToDepository( final ProjectFilesTreeLeafObject fileObject );


                                                                            
 /**
  *  Called from the projectfilestree, after the file with the given path
  *  has been removed. Required for synchronizing the compiler list in
  *  the output manager.
  */
  public void removeSourceFilePathFromCompilerList( final String sourceFilePath );


 /**
  *  Called from the projectfilestree, after the file with the given path
  *  has been added (also after a rename). Required for synchronizing the compiler list in
  *  the output manager.
  */
  public void addSourceFileAndDependentFilesToCompilerList( final String filePath );
                       
                 
 /**
  *  For any child-frame or dialog, we must take the fullscreen frame
  *  as parent, if the user is working with this one in fullscreenmode,
  *  otherwise we return the mainframe as parent.
  */
  public JFrame getParentFrameForChildren();
  
                    
  public IDE_MainFrameProvider getMainFrameProvider();                    
                    
                    
} // IDE_ProjectFrameProvider
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.