ide/src/wombat/util/files/DocumentManager.java
public static boolean HostShared() throws Exception {
    	if (me == null) throw new RuntimeException("Document manager not initialized.");
        
        SharedTextArea ss = new SharedTextArea(InetAddress.getLocalHost(), SharedTextArea.NEXT_PORT++, true);
        me.allDocuments.add(ss);
        ss.code.addFocusListener(me);
        
        me.lastIndex++;
        String id = "document-" + me.lastIndex;
        
        me.Views.addView(id, new View("<new document> (" + ss.getDocumentName() + ")", null, ss));
        ss.myView = me.Views.getView(id);
        
        me.Documents.addTab(me.Views.getView(id));
        
        if (me.Root != null && !me.Documents.isShowing())
        	me.Root.setWindow(new SplitWindow(false, 0.6f, me.Documents, me.Root.getWindow()));
         
        ss.code.requestFocusInWindow();
        
        return true;
		
	}
/**
     * Create a new shared document.
     * @throws Exception If we cannot host.
     */
Create a new shared document.
@throws Exception If we cannot host.
Create a new shared document . @throws Exception If we cannot host .
public static boolean HostShared() throws Exception {
    	if (me == null) throw new RuntimeException("Document manager not initialized.");
        SharedTextArea ss = new SharedTextArea(InetAddress.getLocalHost(), SharedTextArea.NEXT_PORT++, true);
        me.allDocuments.add(ss);
        ss.code.addFocusListener(me);
        me.lastIndex++;
        String id = "document-" + me.lastIndex;
        me.Views.addView(id, new View("<new document> (" + ss.getDocumentName() + ")", null, ss));
        ss.myView = me.Views.getView(id);
        me.Documents.addTab(me.Views.getView(id));
        if (me.Root != null && !me.Documents.isShowing())
        	me.Root.setWindow(new SplitWindow(false, 0.6f, me.Documents, me.Root.getWindow()));
        ss.code.requestFocusInWindow();
        return true;
	}
public static boolean HostShared ( ) throws Exception { if ( me == null ) throw new RuntimeException ( "Document manager not initialized." ) ; SharedTextArea ss = new SharedTextArea ( InetAddress . getLocalHost ( ) , SharedTextArea . NEXT_PORT ++ , true ) ; me . allDocuments . add ( ss ) ; ss . code . addFocusListener ( me ) ; me . lastIndex ++ ; String id = "document-" + me . lastIndex ; me . Views . addView ( id , new View ( "<new document> (" + ss . getDocumentName ( ) + ")" , null , ss ) ) ; ss . myView = me . Views . getView ( id ) ; me . Documents . addTab ( me . Views . getView ( id ) ) ; if ( me . Root != null && ! me . Documents . isShowing ( ) ) me . Root . setWindow ( new SplitWindow ( false , 0.6f , me . Documents , me . Root . getWindow ( ) ) ) ; ss . code . requestFocusInWindow ( ) ; return true ; }
Create a new shared document.
Create a new shared document .