package com.tikal.jenkins.plugins.multijob;

import hudson.Extension;
import hudson.model.DependencyGraph;
import hudson.model.ItemGroup;
import hudson.model.TopLevelItem;
import hudson.model.Hudson;
import hudson.model.Project;
import hudson.util.AlternativeUiTextProvider;

import com.tikal.jenkins.plugins.multijob.views.MultiJobView;

public class MultiJobProject extends Project<MultiJobProject, MultiJobBuild>
		implements TopLevelItem {


	@SuppressWarnings("rawtypes")
	private MultiJobProject(ItemGroup parent, String name) {
		super(parent, name);
	}

	public MultiJobProject(Hudson parent, String name) {
		super(parent, name);
	}

	@Override
	protected Class<MultiJobBuild> getBuildClass() {
		return MultiJobBuild.class;
	}

	@Override
	public Hudson getParent() {
		return Hudson.getInstance();
	}
	
        @Override
        public String getPronoun() {
            return AlternativeUiTextProvider.get(PRONOUN, this, getDescriptor().getDisplayName());
        }

	public DescriptorImpl getDescriptor() {
		return DESCRIPTOR;
	}

	@Extension(ordinal = 1000)
	public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

	public static final class DescriptorImpl extends AbstractProjectDescriptor {
		public String getDisplayName() {
			return "MultiJob Project";
		}

		@SuppressWarnings("rawtypes")
		public MultiJobProject newInstance(ItemGroup itemGroup, String name) {
			return new MultiJobProject(itemGroup, name);
		}
	}

	@Override
	protected void buildDependencyGraph(DependencyGraph graph) {
		super.buildDependencyGraph(graph);
	}

	public boolean isTopMost() {
		return getUpstreamProjects().size() == 0;
	}

	public MultiJobView getView() {
		MultiJobView view = new MultiJobView("");
		return view;
	}

	public String getRootUrl() {
		return Hudson.getInstance().getRootUrl();
	}
}

@@ -36,24 +36,55 @@
 ultijob;%0D%0A%0D%0A
+import jenkins.model.Jenkins;%0D%0A
 import hudso
@@ -816,103 +816,8 @@
 lic 
-Hudson getParent() %7B%0D%0A%09%09return Hudson.getInstance();%0D%0A%09%7D%0D%0A%09%0D%0A        @Override%0D%0A        public 
 Stri
@@ -839,20 +839,10 @@
  %7B%0D%0A
-            
+%09%09
 retu
@@ -929,16 +929,9 @@
 );%0D%0A
-        
+%09
 %7D%0D%0A%0D
@@ -1665,27 +1665,14 @@
 %0D%0A%09%09
-MultiJobView view =
+return
  new
@@ -1695,24 +1695,8 @@
 );%0D%0A
-%09%09return view;%0D%0A
 %09%7D%0D%0A
@@ -1737,22 +1737,23 @@
 %09return 
-Hudson
+Jenkins
 .getInst

Update MultiJobProject.java