There is nothing illegal about Israel's presence in the West Bank or about Israeli communities in the West Bank. The international law you refer to concerns land captured from another country in a war. It has no application to the West Bank since Jordan had had not legal right to it and, in any case, Israel had offered to return it in return for peace a week after the end of the Six Day War. Furthermore, the present arrangement, Israeli control of Area C and joint security control with the PA, is by agreement with the PA as specified in the Oslo Accords.
If the Palestinian Arabs are unhappy with the present arrangement, they can come back to the negotiating table and try to negotiate a new one. Negotiations have failed so far because the PA has been more interested in objecting to the existence of the state of Israel than in establishing a state of their own in the disputed territories by demanding Israel admit millions of foreigners and a corridor between Gaza and the West Bank that would cut Israel into two pieces. If the Palestinian Arabs can ever agree among themselves that they want to live in peace alongside the Jewish state of Israel, perhaps a Palestinian Arab state can be established in the disputed territories, but so far there is no indication they are prepared to live in peace next to the Jewish state of Israel.
Jordan never owned the UN Mandate of Palestine, they administered it. The pre-emptive strike by Israel was a land grab. That's how the world sees it. Not even the USA has recognized Israel's anexations and that why the US Embassy is located in Tel Aviv and not Jerusalem.
You are confused. Jordan annexed the West Bank and made all the Arabs there Jordanian citizens, and in the Six Day War, Jordan was suckered by Nasser into attacking Israel. Nasser told him that Egypt had destroyed the IAF and that Jordan had nothing to fear. While Israel's attack on Egypt was preemptive, but justified, it was Jordan that attacked Israel in the Six Day War. Another interesting fact you may not have come across is that after liberating Jerusalem, the IDF stopped, assuming Jordan would keep control of the rest of the West Bank, but when Dayan learned the Jordanian army had fled all the way across the river, he ordered the IDF to advance to the river, a natural boundary.
You are misguided in thinking Israel's intent was to grab land. Within a week of the end of the war, Israel offered to return all the land it had captured in return for peace. None of the Arab states responded, but a short time later, the Arab nations met in Khartoum and issued their famous three no's: no peace with Israel, not recognition of Israel and no negotiations with Israel. In this way the Arab nations abandoned the land Israel had captured. It is clear that Israel's intention was to try to grab peace with the Arabs, not to grab land.