Find the current layout and extract the activity code order and visibility.

@param phoenixProject phoenix project data
181616
private void processLayouts(Project phoenixProject)
   {
      //
      // Find the active layout
      //
      Layout activeLayout = getActiveLayout(phoenixProject);

      //
      // Create a list of the visible codes in the correct order
      //
      for (CodeOption option : activeLayout.getCodeOptions().getCodeOption())
      {
         if (option.isShown().booleanValue())
         {
            m_codeSequence.add(getUUID(option.getCodeUuid(), option.getCode()));
         }
      }
   }
135150
public static void showPanel(final View panelLayout) {
        final Activity activity = (Activity) panelLayout.getContext();
        panelLayout.setVisibility(View.VISIBLE);
        if (activity.getCurrentFocus() != null) {
            KeyboardUtil.hideKeyboard(activity.getCurrentFocus());
        }
    }
681049
@SuppressWarnings( "unchecked" )
    private List<String> findOptionalMojosForLifecycle( MavenProject project, Lifecycle lifecycle )
        throws LifecycleExecutionException, PluginNotFoundException
    {
        String packaging = project.getPackaging();
        List<String> optionalMojos = null;

        LifecycleMapping m =
            (LifecycleMapping) findExtension( project, LifecycleMapping.ROLE, packaging, session.getSettings(),
                                              session.getLocalRepository() );

        if ( m != null )
        {
            optionalMojos = m.getOptionalMojos( lifecycle.getId() );
        }

        if ( optionalMojos == null )
        {
            try
            {
                m = (LifecycleMapping) session.lookup( LifecycleMapping.ROLE, packaging );
                optionalMojos = m.getOptionalMojos( lifecycle.getId() );
            }
            catch ( ComponentLookupException e )
            {
                log.debug( "Error looking up lifecycle mapping to retrieve optional mojos. Lifecycle ID: "
                    + lifecycle.getId() + ". Error: " + e.getMessage(), e );
            }
        }

        if ( optionalMojos == null )
        {
            optionalMojos = Collections.emptyList();
        }

        return optionalMojos;
    }
22553
def previous_layout(pymux, variables):
    "  "
    pane = pymux.arrangement.get_active_window()
    if pane:
        pane.select_previous_layout()
653886
public List<JavaResource> getProjectInterfaces(Project project)
   {
      final List<JavaResource> classes = new ArrayList<>();
      if (project != null)
      {
         project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaInterfaceSourceVisitor(classes));
      }
      return classes;
   }
1040049
@SuppressWarnings("deprecation")
    @SuppressLint("NewApi")
    public static int getScreenWidth(Activity context) {

        Display display = context.getWindowManager().getDefaultDisplay();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
            Point size = new Point();
            display.getSize(size);
            return size.x;
        }
        return display.getWidth();
    }
784628
protected void layoutGroupVariables(DJGroup group, JRDesignGroup jgroup, int labelOffset) {
		log.debug("Starting groups variables layout...");

//		JRDesignBand headerBand = (JRDesignBand) jgroup.getGroupHeader();
		JRDesignSection headerSection = (JRDesignSection) jgroup.getGroupHeaderSection();
		JRDesignBand headerBand = (JRDesignBand) headerSection.getBandsList().get(0);
		if (headerBand == null){
			headerBand = new JRDesignBand();
			headerSection.addBand(headerBand);
//			jgroup.setGroupHeader(headerBand);
		}

		JRDesignSection footerSection = (JRDesignSection) jgroup.getGroupFooterSection();
		JRDesignBand footerBand = (JRDesignBand) footerSection.getBandsList().get(0);
		if (footerBand == null){
			footerBand = new JRDesignBand();
			footerSection.addBand(footerBand);
//			jgroup.setGroupFooter(footerBand);
		}

		int headerOffset = 0;

		//Show the current value above the column name
		int yOffset = 0;
		GroupLayout layout = group.getLayout();
		//Only the value in header
		PropertyColumn column = group.getColumnToGroupBy();

		int height = group.getHeaderVariablesHeight()!= DynamicReportOptions.UNSET_VALUE
		? group.getHeaderVariablesHeight()
				:getReport().getOptions().getDetailHeight();

		//VALUE_IN_HEADER,
		//VALUE_IN_HEADER_WITH_HEADERS,
		//VALUE_IN_HEADER_AND_FOR_EACH,
		//VALUE_IN_HEADER_AND_FOR_EACH_WITH_HEADERS
		if (layout.isShowValueInHeader() && layout.isHideColumn() && !layout.isShowColumnName()){
			//textfield for the current value
			JRDesignTextField currentValue = generateTextFieldFromColumn(column, height, group);
			currentValue.setPositionType( PositionTypeEnum.FIX_RELATIVE_TO_TOP );

			//The width will be all the page, except for the width of the header variables
            int headerVariablesWidth = getReport().getOptions().getPrintableWidth();

            if (!group.getHeaderVariables().isEmpty()){
            	DJGroupVariable leftmostcol = findLeftMostColumn(group.getHeaderVariables());
            	headerVariablesWidth = leftmostcol.getColumnToApplyOperation().getPosX();
            	if (groupLabelsPresent(group.getHeaderVariables())){
            		currentValue.setY(height);
            		currentValue.setHeight(getHeaderVariablesHeight(group));
            	}
            }
            currentValue.setWidth(headerVariablesWidth);

			//fix the height depending on the font size
//			currentValue.setHeight(FontHelper.getHeightFor(column.getStyle().getFont())); //XXX CAREFULL
			yOffset += currentValue.getHeight();

			//Move down existing elements in the band.
			LayoutUtils.moveBandsElemnts(yOffset-1, headerBand); //Don't know why, but without the "-1" it wont show the headers

			if (group.getLayout().isPrintHeaders()){
				headerOffset += group.getHeaderHeight() + getReport().getOptions().getDetailHeight();
			}

			headerBand.addElement(currentValue);
		}
		//DEFAULT and DEFAULT_WITH_HEADER
		else if (layout.isShowValueInHeader() && !layout.isHideColumn() && !layout.isShowColumnName()){
			headerOffset = changeHeaderBandHeightForVariables(headerBand, group);
			insertValueInHeader(headerBand, group, headerOffset);
		}
		//VALUE_IN_HEADER_WITH_HEADERS_AND_COLUMN_NAME
		else if (layout.isShowValueInHeader() && layout.isHideColumn() && layout.isShowColumnName()){
			//Create the element for the column name
			JRDesignTextField columnNameTf = createColumnNameTextField(group, column);
			columnNameTf.setY(columnNameTf.getY() + headerOffset);

			//textfield for the current value
			JRDesignTextField currentValue = generateTextFieldFromColumn(column, height, group);

			//The width will be (width of the page) - (column name width)
			currentValue.setWidth(getReport().getOptions().getPrintableWidth() - columnNameTf.getWidth());
			//The x position for the current value is right next to the column name
			currentValue.setX(columnNameTf.getWidth());

			//fix the height depending on the font size
			//fixes issue 2817859
			//currentValue.setHeight(FontHelper.getHeightFor(column.getStyle().getFont()));
			if (column.getStyle() != null && column.getStyle().getFont() != null)
				currentValue.setHeight(FontHelper.getHeightFor(column.getStyle().getFont()));
			columnNameTf.setHeight(currentValue.getHeight());

			yOffset += currentValue.getHeight();

			//Move down existing elements in the band.
			LayoutUtils.moveBandsElemnts(yOffset, headerBand);

			headerBand.addElement(columnNameTf);
			headerBand.addElement(currentValue);
		}

		placeVariableInBand(group.getHeaderVariables(), group, jgroup, DJConstants.HEADER, headerBand, headerOffset);
		placeVariableInBand(group.getFooterVariables(), group, jgroup, DJConstants.FOOTER, footerBand, labelOffset);
	}
1115711
@GetMapping
  public String viewMappingProjects(Model model) {
    model.addAttribute("mappingProjects", mappingService.getAllMappingProjects());
    model.addAttribute("entityTypes", getWritableEntityTypes());
    model.addAttribute("user", getCurrentUsername());
    model.addAttribute("admin", currentUserIsSu());
    model.addAttribute(
        "importerUri", menuReaderService.findMenuItemPath(ImportWizardController.ID));
    return VIEW_MAPPING_PROJECTS;
  }
743665
private void readProjectProperties(Project ganttProject)
   {
      ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
      mpxjProperties.setName(ganttProject.getName());
      mpxjProperties.setCompany(ganttProject.getCompany());
      mpxjProperties.setDefaultDurationUnits(TimeUnit.DAYS);

      String locale = ganttProject.getLocale();
      if (locale == null)
      {
         locale = "en_US";
      }
      m_localeDateFormat = DateFormat.getDateInstance(DateFormat.SHORT, new Locale(locale));
   }
890641
private void processActivityCodes(APIBusinessObjects apibo, ProjectType project)
   {
      ActivityCodeContainer container = m_projectFile.getActivityCodes();
      Map<Integer, ActivityCode> map = new HashMap<Integer, ActivityCode>();

      List<ActivityCodeTypeType> types = new ArrayList<ActivityCodeTypeType>();
      types.addAll(apibo.getActivityCodeType());
      types.addAll(project.getActivityCodeType());

      for (ActivityCodeTypeType type : types)
      {
         ActivityCode code = new ActivityCode(type.getObjectId(), type.getName());
         container.add(code);
         map.put(code.getUniqueID(), code);
      }

      List<ActivityCodeType> typeValues = new ArrayList<ActivityCodeType>();
      typeValues.addAll(apibo.getActivityCode());
      typeValues.addAll(project.getActivityCode());

      for (ActivityCodeType typeValue : typeValues)
      {
         ActivityCode code = map.get(typeValue.getCodeTypeObjectId());
         if (code != null)
         {
            ActivityCodeValue value = code.addValue(typeValue.getObjectId(), typeValue.getCodeValue(), typeValue.getDescription());
            m_activityCodeMap.put(value.getUniqueID(), value);
         }
      }
   }
98569
public static @CheckForNull
    BugCollection redoAnalysisKeepComments(@Nonnull Project p) {
        requireNonNull(p, "null project");

        BugCollection current = MainFrame.getInstance().getBugCollection();

        Update update = new Update();

        RedoAnalysisCallback ac = new RedoAnalysisCallback();

        AnalyzingDialog.show(p, ac, true);

        if (!ac.finished) {
            return null;
        }
        if (current == null) {
            current =  ac.getBugCollection();
        } else {
            current =  update.mergeCollections(current, ac.getBugCollection(), true, false);
            if (current.hasDeadBugs()) {
                addDeadBugMatcher(current);
            }
        }
        return current;


    }
1090573
def get_layout(self):
        
        if self.request.is_ajax():
            layout = ['modal', ]
        else:
            layout = ['static_page', ]

        if self.workflow_class.wizard:
            layout += ['wizard', ]

        return layout
1026809
private void readProjectProperties(Settings phoenixSettings, Storepoint storepoint)
   {
      ProjectProperties mpxjProperties = m_projectFile.getProjectProperties();
      mpxjProperties.setName(phoenixSettings.getTitle());
      mpxjProperties.setDefaultDurationUnits(phoenixSettings.getBaseunit());
      mpxjProperties.setStatusDate(storepoint.getDataDate());
   }
653357
protected void postLayoutChild(final int dataIndex) {
        if (!mContainer.isDynamic()) {
            boolean visibleInLayout = !mViewPort.isClippingEnabled() || inViewPort(dataIndex);
            ViewPortVisibility visibility = visibleInLayout ?
                    ViewPortVisibility.FULLY_VISIBLE : ViewPortVisibility.INVISIBLE;
            Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "onLayout: child with dataId [%d] viewportVisibility = %s",
                    dataIndex, visibility);

            Widget childWidget = mContainer.get(dataIndex);
            if (childWidget != null) {
                childWidget.setViewPortVisibility(visibility);
            }
        }
    }
1088181
@Override
    public String getLayoutContent(LayoutIdentifier layout) {
        return propertyService.getValue(getPropertyName(layout.shared), layout.name);
    }
794972
protected static IJavaProject[] getProjectSearchOrder(String projectName) {

		ArrayList<String> projectNames= new ArrayList<>();
		projectNames.add(projectName);

		int nextProject= 0;
		while (nextProject < projectNames.size()) {
			String nextProjectName= projectNames.get(nextProject);
			IJavaProject jproject= getJavaProject(nextProjectName);

			if (jproject != null) {
				try {
					String[] childProjectNames= jproject.getRequiredProjectNames();
					for (int i= 0; i < childProjectNames.length; i++) {
						if (!projectNames.contains(childProjectNames[i])) {
							projectNames.add(childProjectNames[i]);
						}
					}
				} catch (JavaModelException e) {
					JavaPlugin.log(e);
				}
			}
			nextProject+= 1;
		}

		ArrayList<IJavaProject> result= new ArrayList<>();
		for (int i= 0, size= projectNames.size(); i < size; i++) {
			String name= projectNames.get(i);
			IJavaProject project= getJavaProject(name);
			if (project != null)
				result.add(project);
		}

		return result.toArray(new IJavaProject[result.size()]);
	}
210307
private static void listProjectProperties(ProjectFile file)
   {
      SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm z");
      ProjectProperties properties = file.getProjectProperties();
      Date startDate = properties.getStartDate();
      Date finishDate = properties.getFinishDate();
      String formattedStartDate = startDate == null ? "(none)" : df.format(startDate);
      String formattedFinishDate = finishDate == null ? "(none)" : df.format(finishDate);

      System.out.println("MPP file type: " + properties.getMppFileType());
      System.out.println("Project Properties: StartDate=" + formattedStartDate + " FinishDate=" + formattedFinishDate);
      System.out.println();
   }