<commit_before>package org.nakedobjects.viewer.skylark.basic;

import org.nakedobjects.NakedObjects;
import org.nakedobjects.object.NakedClass;
import org.nakedobjects.object.NakedObject;
import org.nakedobjects.object.NakedObjectSpecification;
import org.nakedobjects.object.reflect.Action;
import org.nakedobjects.viewer.skylark.MenuOption;
import org.nakedobjects.viewer.skylark.MenuOptionSet;


public class ClassOption {
    public static void menuOptions(NakedObjectSpecification specificaton, MenuOptionSet menuOptionSet) {
        NakedClass nakedClass = NakedObjects.getObjectManager().getNakedClass(specificaton);
        NakedObject classAdapter = NakedObjects.getObjectLoader().getAdapterOrCreateTransientFor(nakedClass);

        Action[] actions;
        actions = specificaton.getClassActions(Action.USER);
        for (int i = 0; i < actions.length; i++) {
            addOption(classAdapter, menuOptionSet, actions[i], MenuOptionSet.OBJECT);
        }<commit_msg>Refactoring to tidy up resolving and combine object factory and manager - IV<commit_after>package org.nakedobjects.viewer.skylark.basic;

import org.nakedobjects.NakedObjects;
import org.nakedobjects.object.NakedClass;
import org.nakedobjects.object.NakedObject;
import org.nakedobjects.object.NakedObjectSpecification;
import org.nakedobjects.object.reflect.Action;
import org.nakedobjects.viewer.skylark.MenuOption;
import org.nakedobjects.viewer.skylark.MenuOptionSet;


public class ClassOption {
    public static void menuOptions(NakedObjectSpecification specificaton, MenuOptionSet menuOptionSet) {
        NakedClass nakedClass = NakedObjects.getObjectManager().getNakedClass(specificaton);
        NakedObject classAdapter = NakedObjects.getObjectLoader().getAdapterForElseCreateAdapterForTransient(nakedClass);

        Action[] actions;
        actions = specificaton.getClassActions(Action.USER);
        for (int i = 0; i < actions.length; i++) {
            addOption(classAdapter, menuOptionSet, actions[i], MenuOptionSet.OBJECT);
        }
{'fraction_non_alphanumeric': 0.08697788697788698, 'fraction_numerical': 0.0009828009828009828, 'mean_word_length': 5.16969696969697, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7662229', 'n_tokens_mistral': 582, 'n_tokens_neox': 573, 'n_words': 105}